fix pep8 and pyflakes infractions