Serialize sub- and superlocations. Also added detailed parameter serialization.