Startup refactor and general cleanup
Merge pull request #529 from rorygraves/config_cleanup

Startup refactor and general cleanup
initial work to refactor the indexer