lets slit the widget code into classes