Get rid of trailing whitespace and fix newlines