Change various repeated wr[someindex]/pkt[someindex] references to a pointer