Cleaned up import and flake8 errors