Added first version of tree layout algorithm.