Refactoring dialogs.