removed trailing whitespace, fixed typos

Normally I wouldn't send a single PR with changes to this many files, but since it's just documentation I hope that's no problem.