Minor tidy up of code example

Just made some rather minor tidy ups to a couple of the code examples.

Thanks for the book!