Clean up.
Add configuration file parser & clean up the implementation.