Update widget-factory.js