Add new types PacketType and PositionFormat.
Change Packet.PacketType uint -> Packet.Type PacketType.
Change Packet.Format uint -> Packet.PosFormat PositionFormat.
Use appropriate datatypes for constants.