Add another test, fix canonical parser.
Test write and parse.