Define widget class once