Refactored packet, added checksum calculation and debug/test code in client.cpp