Simplify a control flow