Added widgetmanager and button logic.