Fix for bug #13

@donnapep Please review. I also added a lot of code cleanup in my last commit of this PR (jshint, jslint, inspections) as I had not done so previously with this widget. To review the exact bug fix, review the second commit entitled "Fix to bug involving dummyVar".