Adding some work in Chapter 6

Don't have a compiler on hand, so need to test later.