Sort out branches.