 import ObjectMapper
 
 struct BranchListViewModel {
-    var branches = [Branch]()
+    
+    var branches = [(Branch, Commit)]()
     
     var ownerName: String!
     var repoName: String!

        self.repoName = repoName
    }
    
    
    func loadBranches(completion completion: ()->(), errorHandler: ((String) -> ())? = nil) {
        let url = "https://api.github.com/repos/\(ownerName)/\(repoName)/branches"
        Alamofire.request(.GET, url)
            .responseJSON { response in

                        switch statusCode{
                        case 200..<299:
                            if let json = response.result.value {
                                if let items = Mapper<Branch>().mapArray(json) {
                                    for branch in items {
                                        Alamofire.request(.GET, branch.latestCommitURLString!).responseJSON { res in
                                            if let commitJSON = res.result.value {
                                                if let commit = Mapper<Commit>().map(commitJSON) {
                                                    self.branches.append((branch, commit))
                                                }
                                            }
                                        }
                                    }
                                    completion()
                                }
                            }
                        default:
                            if let errorHandler = errorHandler {
