Changed testSerialization to be table-driven, added a bunch more tests, changed serialization to check more errors