Improve memory safety & error checks.
Finish initial redraft
Write init/finalize & pattern language bindings, haskell-side!