refactoring in dialog and tabs
Refactor all the Dialog