Simplify client packet parsing code.