Refactored dispatching of message events