move Indexer helper and client code into indexer component