Use only object constructor. Added support for defining a separate widget container.