Changed SceneManager to behave more like a state machine