Refactor the indexer structure and add some TODOs