Add support for configuring the frame length.
Merge in master.
Switch the default frame length to 4 for this branch.