Added packet serialization and deserialization
Fixed a bug in the test signal generation
Converted Packet to a struct