Clean up the examples to use the new API. 

SPaG this