state management for widgets and editing models via the API