Lots of little fixes, plus chapter 9 example.

How about some /** */ comments on this code explaining what you're doing?