Tidy up before branching