fixed typo in xsi type assignment check
fixed bug in state reverse mapping and completed basic tests.  All basic unit tests passing for serializing character matrices now. yay.