Add labels and fix flake8 errors