fix pep8 and unused imports