Cleaned up a little

Compared my solution to the solution in the book. Tidied up a couple of
things.