Simplified the events dispatcher because shared memory references were causing events to be dispatched multiple times