Added ability to supply a completion function in addition to the standard "completed" event.