Update models.js

update widget code to work on dev