Pep8 and pyflakes fixes