Refactor common widget stuff (entity management, logging, disposability) into a base class.