Pull out Serialize and Deserialize methods