Whitespace fixes to make pep8 happy!
PEP8 fixes.
Fixed some ReferenceErrors (thanks pyflakes) they must not test this.