Some PEP8 and PyFlakes fixes