Fix line endings

Removed trailing spaces and fixed issues with some commands not applying
to all of the text.