Updated StateManager