Fix naming and white space

You may want to update the code in the book to reflect these changes.