Move events to a separate file