Added BaseWidget and RootWidget classes.