Make config file location configurable and organize TODOs.
Refactor code to be more functionalized.