Add "expand all" and "collapse all" functionality.