Improved packet parsing.