Code cleanup

-  reorganized code and created a config file