         tableView.deselectRowAtIndexPath(indexPath, animated: true)
     }
 
+
     // MARK: NSFetchedResultsController
+
 
     lazy var fetchedResultsController : NSFetchedResultsController = {
         NSFetchedResultsController.deleteCacheWithName("StationPicker")
 
-        let contxt = Datamanager.sharedManager().managedObjectContext!
+        let contxt = Datamanager.sharedManager().managedObjectContext
 
         let fetchRequest = NSFetchRequest(entityName: "CDStation")
         fetchRequest.fetchBatchSize = 20

    }


    override func viewWillAppear(animated: Bool)
    {
        super.viewWillAppear(animated)

        RHEVindsidenAPIClient.defaultManager().operationQueue.suspended = true
    }


    override func viewWillDisappear(animated: Bool)
    {
        super.viewWillDisappear(animated)
        RHEVindsidenAPIClient.defaultManager().operationQueue.suspended = false
    }


    override func setEditing(editing: Bool, animated: Bool)
    {
        super.setEditing(editing, animated: animated)
        navigationItem.leftBarButtonItem?.enabled = !editing
    }


    func preferredContentSizeDidChange( notification: NSNotification )
    {
        tableView.reloadData()
    }


    func configureCell( cell: UITableViewCell, atIndexPath indexPath: NSIndexPath)
    {
        let station = fetchedResultsController.objectAtIndexPath(indexPath) as! CDStation
        cell.textLabel?.text = station.stationName;
        cell.detailTextLabel?.text = station.city;

        if station.isHidden.boolValue {
            cell.imageView?.image = UIImage(named: "uncheckmark_icon", inBundle: nil, compatibleWithTraitCollection: self.traitCollection)
        } else {
            cell.imageView?.image = UIImage(named: "checkmark_icon", inBundle: nil, compatibleWithTraitCollection: self.traitCollection)

    }


    override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
        cell.textLabel?.font = UIFont.preferredFontForTextStyle((cell.textLabel?.font.fontDescriptor().objectForKey("NSCTFontUIUsageAttribute") as! String))
        cell.detailTextLabel?.font = UIFont.preferredFontForTextStyle((cell.detailTextLabel?.font.fontDescriptor().objectForKey("NSCTFontUIUsageAttribute") as! String))
    }


    override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
        let station = fetchedResultsController.objectAtIndexPath(indexPath) as! CDStation

        if let hidden = station.isHidden {
            station.isHidden = NSNumber(bool: !hidden.boolValue)
        }

        let context = Datamanager.sharedManager().managedObjectContext

        do {
            try context.save()
