Move events definitions into proper components