Refactor to use pre-existing Packet library