pep8 and flake8 fixes