Refactor neighbourIndices