Added functionality to edit widgets.