Remove debug code
extract rollback code to the widgetManager