update from mattjhayes
Merge pull request #22 from mattjhayes/develop

A bit of code refactoring and added logging level control from config file