Convert the rest of the ocaml types and functions to use context.