Adding optimized dist subtree.