pyflakes & pep8 fixes