Adds mode indicator and length.

Length still needs to be correctly padded.