Mostly PEP8 and rm unused imports.