Further work to get dialogs working.