Create base class for widgets.