fix ocaml-bin location inference, some code cleanup, precondition fix