Improvements to OCaml version

A couple of small improvements to the OCaml version. Cuts about 40% off the execution time for me.