Ported Preferences dialog to OCaml