Created enum for event type and Adding components behaviour as required

Also fixed the creation of events on task_controller