Use ppx_tools to simplify the code.
Fix compilation with camlp4.