Various cleanups in OC.dialogs