Updated EventDispatcher to use prototype.