changes line ending, deletes trailing whitespace