Some minor improvements

I modified the loading of the config file to use ```with``` so it gets closed afterwards. I also added a few linebreaks to comply with PEP8.