Flattening branches