Fist set of changes from Jon Forrest. Chap 3 is only partly done.