PEP8 and pyflakes fixes