code cleanup: PEP8 and unused imports