More work on serialization and datatypes.