PEP8 fixes and code clarity

Mostly PEP8 fixes, a removal of a stale code comment on dict comprehension and a minor 'if not' statement fix.