Cleaned up Indexer code