Documentation fixes.
Minor refactoring.
Fix transmission field-packing errors.

There were issues with both endianness and also selecting the proper bit-length of the field.

With this commit, transmission is now correct as far as I've been able to test.