Fix PEP8 and unused imports