Code clean-up in indexer.py