Fix PEP8 E712 issues (comparisons to True).
Misc PEP8 fixes.