Converted plugin to WidgetFactory. This is a preliminary working version.