Refactoring indexing