just formatting fixes and trivial refactoring
added --config cmd switch to specify path to config file