Made some small performance improvements to the indexer