Not yet working tree implementation