Refactored dialogs. refs #9