Updated ch2 example
Updated ch2 example
Updated ch3 examples to include lifecycle code