Create a Widget class as a template