Add copyright and remove trailing whitespace