Update script to generate tree for visualization.