refactored grimwire.js to self-contained grimwidget.js