Adding a bunch of stuff from Real World OCaml