Stop cloned objects from having a pointer to the SC of the orginal.
Refactor CodeRef to a seperate file.