Re-added the event file, change how AppStates are constructed, made a changestate function