Make the trees immutable - it will make reasoning about correctness easier.