some cleanups so the hack necessary in order to add special serialization is more apparent in the client code