Shells in OCaml

Performance tweaks II master