Filling out struct serialization functions.