clearBranches extension