Various cleanups, esp for PEP8
Merging changes