Refactor to introduce concept of Widgets, with associated classes.