Crappy OCaml code; view at your own risk. I take no responsibility if your eyes burn.