A bunch of PEP8 cleanups and getting rid of unused imports and variables.