Cleaned up the EventDispatcher.js once handling so it doesn't mutate the callback function directly.