Add version to serialization and add serialization to more classes.