fix Pep8 and pyflakes errors