Created Packet class for better packet handling.