Adding copy tree recursive algorithm.