Comment your assumptions.
Add basic code for diagnostic frame serialization
Serialize priority and padding data.
Avoid unnecessary list creation.
Fixup some spacing.
Make individual frames only responsible for bodies
Fix up the naming convention.
Drop the word FRAME from diags
Serialize DATA frames.
Handle padding.