Pointer math for payload_write function condensed to eliminate having a 32-bit and 16-bit separate pointer var.