code cleanup for latest pep8/pyflakes