some simplifications to the examples, typos etc