Moved event function forwards into another file