Implement Encoder.
Update for latest OCaml.
Implement syntax for encoding.