More work on StateManager