Dominic: tidy up serialisation