Overhaul to packets to improve code neatness