Separating out the packet parsing