Fixed some issues with packet parsing
Fixed invalid variable names casuing isValid() to always return false
Fixed missing return in Packet.parse(raw)
Updated parentheses to please jslint, amongst other fixes