Add missing copyright notices, trim trailing spaces in comments.