Refactored dialogs.