Stop passing around widget classes and use objects