simplify the code. Every common part is in Tree, now.