Refactored PacketRecorder methods.