Work on serialisation; first Erlang draft.