Changed the PushState, PopState, and ChangeState functions to make sure there is only one state connected to the mediator at a time.