Split indexer.py to two parts