Reminified changes to dialogs.js