Fix pep8 and pyflakes