Lots of little fixes, plus chapter 9 example.

Same comment as in the other file--this should be a class member variable.