Fixes for PEP8 W2 whitespace warnings.
Fix PEP8 E711 and E712 (comparisons to True/False/None).
Fixes for PEP8 E241 and E242.
Fixes for PEP8 E3 issues (too few or too many blank lines).