Put the flake8 config in a real config file, also fix some violations