     }
 
 
+    var editButton: UIBarButtonItem!
+    var doneButton: UIBarButtonItem!
     var tableView: UITableView!
 
     var cards: [Card]!

        self.tableView.autoresizingMask = .FlexibleWidth | .FlexibleHeight
        self.tableView.dataSource = self
        self.tableView.delegate = self
        self.view.addSubview(self.tableView)

        self.cards = Card.fetchAll()

        self.title = __("Cardmoa")
        self.view.backgroundColor = UIColor.whiteColor()

        self.editButton = UIBarButtonItem(
            barButtonSystemItem: .Edit,
            target: self,
            action: "editButtonDidPress"
        )
        self.doneButton = UIBarButtonItem(
            barButtonSystemItem: .Done,
            target: self,
            action: "editButtonDidPress"
        )
        self.navigationItem.leftBarButtonItem = self.editButton
        self.navigationItem.rightBarButtonItem = UIBarButtonItem(
            barButtonSystemItem: .Add,
            target: self,
