Support for multiple instances.

Lots of clean up. Supports multiple instances of the widget. Speedup for event bubbling.