Various cleanups (PEP8 and PEP257 related mostly).