Base stuff for serialisation.