Improved broadcast/hook system and DOM event handling