pep8 fixes, unused imports and variables removal