A bit of cleaning up around serialisation