Added fixes for some things pyflakes complained about
Branch: pre-0.12.0-pep8