Rework the whole DOM event system