Remove tabs and remove trailing whitespace from examples

I was going through the book examples and found a few places with mixed tabs / spaces.

Also, removed some trailing whitespace here and there.