Clean up some imports; inject some license headers.