Factor out xname to index and inverse
Fix a bug in how the node was calculated before and add an inverse version to be used in the simulation server.
Fix a bug in how the node was calculated before and add an inverse version to be used in the simulation server.