Merge writePacket and splitPacket into one function
No longer need to do header calculation for writePacket
Add cxmcc to AUTHORS
Remove one more place that does header calculations
Remove an outdated comment about writePacket
Minor code simplification for writePacket
Clean up const variable that is no longer necessary
Merge pull request #164 from cxmcc/writePacket

Refactorization of writePacket