         super.viewDidAppear(animated)
         API.getGroupsForUser().onSuccess { groups in
             self.groups = groups
-            self.unArchivedGroups = groups.filter({$0.archived == false})
-            if self.delegate.tableHeader.archived.on == true {
-                self.visibleGroups = groups
-            } else {
-                self.visibleGroups = self.unArchivedGroups
-            }
             self.tableView.reloadData()
         }
     }
 
+    func visibleGroups() -> [Group]{
+        return self.groups.filter{group in return !group.archived || self.showArchived}
+    }
 
     override func tableView(tableView: UITableView, shouldHighlightRowAtIndexPath indexPath: NSIndexPath) -> Bool {
         return true

            return
        }

        guard let idx = findGroupIndexById(groups, archivedGroup: visibleGroups[indexPath]) else {
            return
        }

        groups[idx].archived = false
        visibleGroups[indexPath].archived = false
        API.putGroup(visibleGroups[indexPath])
        .onSuccess{group in
            NSNotificationCenter.defaultCenter().postNotification(NSNotification(name: "setArchiveButtonValue",object:false))
        }
        .onFailure {
            err in
            self.groups[idx].archived = true
            self.visibleGroups[indexPath].archived = true
        }
    }


        
    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        //Find max size
        return visibleGroups().count
    }
    
    override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
