Updates to state management

Added documentation about the state object.
Ensure that unique updates are performed.