Added a base class for dialogs.