beta release
moved widget to separate class
refactor widget to prepare for templatewidget, work in progress, untested