Fixed various flake8 errors