PEP8 fixes and removed some unused imports