Fix header accessor to allocate buffer space and return the right offset.
Make attachment fields accessible and provide initialization values.