a little widget.js cleanup