ConfirmDialog refactored