Adding PacketType and PacketTile, fixing many errors