Refactored Indexer

Refactored indexer to separate core functionality from file processing
methods.