Changed getBranchesAndBuilds() to return a promise