Packet cleanup

Removed the bytebuffer stored in the Packet. Data is now directly
copied into the data.bytearray instead of into an intermediate
buffer.

Simplified code