Use of the new callbacks. Update demo for an example usage.