small mostly cosmetic refactors to serialization