restructuring of Widget class inheritance and more