add apache-2 copyright
flake8 fixes