remove unused code depends on dialogs