Various flake8 fixes