Added documentation for StateManager