Resolve many Flake8 errors