Master class for dialog (gui)