         let formatter = NSDateFormatter()
         formatter.dateFormat = "MMMM d yyyy - HH:mm:ss"
         let model = self.data![indexPath.row] as RestKitModel
-        cell.textLabel!.text = model.name
-        cell.detailTextLabel!.text = formatter.stringFromDate(model.date)
+        cell.textLabel?.text = model.name
+        cell.detailTextLabel?.text = formatter.stringFromDate(model.date)
+    }
+    
+    override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
+        if (editingStyle == .Delete) {
+            let model = self.data![indexPath.row] as RestKitModel
+            model.beginWriting().delete().endWriting()
+            self.fetchData()
+            tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade)
+        }
     }
     
     override func cellIdentifier() -> String {

        self.data = RestKitModel.all().sorted(by: "date", ascending: false).find()
    }
    
    
    //MARK: - Cell
    


import UIKit

class RestKitTableViewController: StackTableViewController {
    
    //MARK: - Attributes
    
    var data: SugarRecordResults?
    internal let model: NSManagedObjectModel = {
        let modelPath: NSString = NSBundle.mainBundle().pathForResource("Models", ofType: "momd")!
        let model: NSManagedObjectModel = NSManagedObjectModel(contentsOfURL: NSURL(fileURLWithPath: modelPath)!)!
        return model
        }()

    //MARK: - Viewcontroller Lifecycle
    
