Extract constructor flattening logic to methods.