Fixed various flake8 issues