Make flatten for event listeners return task names
Fix halting events
Add halt event
Update tests