     var playlists: [Playlist] = []
     var callback: ((Playlist?) -> Void)?
 
+    var appDelegate: AppDelegate { get { return UIApplication.sharedApplication().delegate as AppDelegate }}
+
     override func viewDidLoad() {
         super.viewDidLoad()
         clearsSelectionOnViewWillAppear = true
         let nib = UINib(nibName: "SelectPlaylistTableViewCell", bundle: nil)
         tableView?.registerNib(nib, forCellReuseIdentifier:self.tableCellReuseIdentifier)
-        fetchPlaylists()
+        observePlaylists()
     }
 
     override func viewWillAppear(animated: Bool) {

            }
        })
    }
}

        super.didReceiveMemoryWarning()
    }

    func observePlaylists() {
        playlists = Playlist.shared.current
        tableView.reloadData()
        Playlist.shared.signal.observe { event in
            let section = 0
            switch event.action {
            case .Create:
                let indexPath = NSIndexPath(forItem: self.playlists.count, inSection: section)
                self.playlists.append(event.value)
                self.tableView.insertRowsAtIndexPaths([indexPath], withRowAnimation: .Fade)
            case .Update:
                if let index = find(self.playlists, event.value) {
                    let indexPath = NSIndexPath(forItem: index, inSection: section)
                    self.playlists[index] = event.value
                    self.tableView.reloadRowsAtIndexPaths([indexPath], withRowAnimation: .Fade)
                }
            case .Remove:
                if let index = find(self.playlists, event.value) {
                    let playlist = self.playlists.removeAtIndex(index)
                    let indexPath = NSIndexPath(forItem: index, inSection: section)
                    self.tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade)
                }
            }
        }
    }

    func newPlaylist() {
        appDelegate.miniPlayerViewController?.playlistTableViewController.newPlaylist()
    }

    func editPlaylist(index: Int) {
        appDelegate.miniPlayerViewController?.playlistTableViewController.showTitleEditAlertViewAtIndex(index)
    }

    func close() {
