All the header sections need to be included in length.
Get Test working again by splitting out some Decode functions.  This in turn makes decoding more logical.