Merged in rest of Native Client changes, untested