Made some changes to undertree.