Moved events to separate file