pep8 and pyflakes fixes