 //
 
 import UIKit
+import ReactiveCocoa
+import LlamaKit
 
 class PlaylistTableViewController: UITableViewController, UIAlertViewDelegate {
     let NEW_PLAYLIST_INDEX = -1
+    var appDelegate: AppDelegate { get { return UIApplication.sharedApplication().delegate as AppDelegate } }
     enum Section: Int {
         case Playing     = 0
         case Selected    = 1

        override func ended()            {}
    }
    let tableCellReuseIdentifier      = "playlistTableViewCell"
    let cellHeight:     CGFloat       = 80
    var playlists:      [Playlist]    = []
    var playerObserver: PlaylistTableViewPlayerObserver?
    var appDelegate: AppDelegate { get { return UIApplication.sharedApplication().delegate as AppDelegate } }

    override func viewDidLoad() {
        super.viewDidLoad()

    func observePlaylists() {
        playlists = Playlist.shared.current
        tableView.reloadData()
        playlistsObserver = Playlist.shared.signal.observe { event in
            let section = Section.Favorites.rawValue
            switch event {
            case .Created(let playlist):
