Pep8 and pyflake fixes