Implemented control widget.
All widget-specific data now travels in a serialized hash.
code cleanup