Created a common base class 'WidgetBase'.

- Re-factored out WidgetBase,
- Added a more extensible scheme for validators.
- Abstracted createContainer, createLabel, and addStyling into methods on the base class.
  This will allow for easier extensibility for people who want to create custom styling.