Trim whitespace, fix a few typos in examples

Just some small fixes for examples.