Refactored dialogs slightly