Add edit mode in state manager