Cleanup and adds list of branches