Flatten Tree

Add a function to flatten tree to the right side