Some work on the packet handler