GuiFactory now uses smart pointers for Dialog, Menu and Theme.