Some optimizations in Packet class for better readibility and less bugs on version checking.