More work on widget. Lots of bugs to iron out.