Port serialize, structure and partially deserialize. test serialize