DON'T MERGE: Packet cleanup

Packet design has been cleaned up. 

Also the Packet doesn't need to create a bytebuffer anymore. Instead of temporarily storing in a bytebuffer, it is now directly written in the byte-array on the correct position. 

This should be merged into the 3.5 branch; it should not be merged into 3.4.