PEP8 cleanups, add missing imports