PEP8, PEP257, other code cleanups