Ran flake8 and cleaned up various format errors

Removed unused imports