Refactor indexer module