a bit of tidy up of chapter5
added second example in chapter 5 - using closures instead of data structs
added 3rd example from chapter 5 - compiling the node defs into closures