Move some of the internal stuff to copy_oauth