pep8 and flake8 code style fixes