I think whoever picked up his ring from the fire (which I think was his wife) programed memories from it into the cyborg, made its face and set him loose.
It makes sense if you think about it.
And why is Donna coming back? I mean, I like her, she's great, but didn't the Dcotor say that if she remembered for even a second she would burn up.