Indexer refactor