Added a second example, and also support for closures as callbacks.