Fix all the hard coding in parsing the packet.