Convert all the packet ids to use the new packettype
Clean up the code