Fixes from PyFlakes issues
Stylistic cleanup from pep8