Setting css ids for some dialogs / refactoring some code.