starting cleaning up the serialization routines in preparation for move to openpal