Add recursive flatten