Removed ugly getNodeIndexFromCoords calls