Get rid of superflous branches.