Basic fixes for tests
Add serialize so serialize/deserialize are symmetric
Fix serialization/deserialization bugs
Add fixtures so tests pass