Add agnostic functions to open/close modal dialogs