refactoring: indexer is more straightforward. Indexer tests cases added