Changed fire_event and add_event_handler for emit and on, respectively.