Removed unused imports and also pep8.