Moved events to external file