Revised chapter 5 (spec) and chapter 6 (examples)