Refactoring of PacketFramer