dialogs service refactoring, button directive refactoring