Updated retiring of branches. Still need to implement flush