Rewrote event controller