Improved code for getting deep copy into same subtree to work.
Refactoring
Merge pull request #2 from Tineler/master

Improved code for getting deep copy into same subtree to work.