moved a bunch of stuff in Utils in HardCaml