Updated code for chapters 6-12

The only thing I didn't retest was the dynamic transaction code in Chapter 12.