Fix a typo and removed trailing spaces from docs and src

I noticed a single typo ("thm instead of "them") while going through the guestbook example so I've fixed it.

In addition, I noticed quite a number of trailing spaces in both the examples and source code (when I am copying them as I go along with the examples) so I took the liberty of removing them as well.