add license headers and fix the others