PEP8 cleanups, further removal of unused code