Fix mutation of tree dna. Add function for generating tests.
Solve merge conflict