comet: Change events to callbacks.