Add missing imports, PEP8 cleanups