Work on signature codec.
Completed encoder