small refactoring
started refactoring of indexer