I'll try to merge this asap, but first I'll play with regular expressions.  At least, I'd like to use regular expressions to extract the parts of individual messages.  All this string manipulation makes it quite hard to get an idea of how an ocaml message looks like.