This could be static to make it clear no state is used. Method or parameter names could be updated to make it clear that the attributes and children are being copied from `transMemory` to `header`, rather than the other way around, or being added to both from somewhere else.