Did some changes to HeterogeneousTree