Change approach to templating in Chapter 21
Fix broken code snippet terminator in Chapter 21