license headers and pep8 fixes