Generated most of the marshalling/unmarshalling bits.