Fix widget scoping.  Close #169.

(`scope` was a "global" var in the widget factory; instantiating the second
widget overwrote it, but `scope` is used later in the event handler.)