Some more updates to state management.