Finished serialisation with writeMessages and readMessages.