     var playlists: Dictionary<String, Any>
     var settings: Settings
     
+    func dictionary() -> Dictionary<String,Any> {
+        var dict: Dictionary<String,Any> = Dictionary()
+        dict[k.name] = self.displayName
+        dict[k.link] = self.fileURL?.absoluteString
+        dict[k.time] = settings.time.value
+        dict[k.rank] = settings.rank.value
+        dict[k.rect] = NSStringFromRect(settings.rect.value)
+        dict[k.label] = settings.autoHideTitle.value
+        dict[k.hover] = settings.disabledFullScreenFloat.value
+        dict[k.alpha] = settings.opacityPercentage.value
+        dict[k.trans] = settings.translucencyPreference.value.rawValue as AnyObject
+        return dict
+    }
+    
+    func restoreSettings(with dictionary: Dictionary<String,Any>) {
+        let plist = dictionary as NSDictionary
+        self.displayName = dictionary[k.name] as! String
+        self.fileURL = URL.init(string: plist[k.link] as! String)!
+        self.settings.time.value = (plist[k.time] as AnyObject).timeInterval ?? 0.0
+        self.settings.rank.value = (plist[k.rank] as AnyObject).intValue ?? 0
+        self.settings.rect.value = (plist[k.rect] as AnyObject).rectValue ?? NSZeroRect
+        self.settings.autoHideTitle.value = (plist[k.label] as AnyObject).boolValue ?? false
+        self.settings.disabledFullScreenFloat.value = (plist[k.hover] as AnyObject).boolValue ?? false
+        self.settings.opacityPercentage.value = (plist[k.alpha] as AnyObject).intValue ?? 60
+        self.settings.translucencyPreference.value = HeliumPanelController.TranslucencyPreference(rawValue: (plist[k.trans] as AnyObject).intValue ?? 0)!
+    }
+
     func updateURL(to url: URL, ofType typeName: String) {
         if typeName == "h3w" {
             if let dict = NSDictionary(contentsOf: url) {
-                if let playArray = dict.value(forKey: UserSettings.Playlists.default) {
-                    for playlist in playArray as! [AnyObject] {
-                       let play = playlist as! Dictionary<String,AnyObject>
-                        let items = play[k.list] as! [Dictionary <String,AnyObject>]
-                        var list : [PlayItem] = [PlayItem]()
-                        for playitem in items {
-                            let item = playitem as Dictionary <String,AnyObject>
-                            let name = item[k.name] as! String
-                            let path = item[k.link] as! String
-                            let time = item[k.time] as? TimeInterval
-                            let link = URL.init(string: path)
-                            let rank = item[k.rank] as! Int
-                            let temp = PlayItem(name:name, link:link!, time:time!, rank:rank)
-                            
-                            // Non-visible (tableView) cells
-                            temp.rect = item[k.rect]?.rectValue ?? NSZeroRect
-                            temp.label = item[k.label]?.boolValue ?? false
-                            temp.hover = item[k.hover]?.boolValue ?? false
-                            temp.alpha = item[k.alpha]?.floatValue ?? 0.6
-                            temp.trans = item[k.trans]?.intValue ?? 0
-                            
-                            list.append(temp)
+                var items: [PlayItem] = [PlayItem]()
+                for (key,list) in dict {
+                    for item in list as! [Dictionary<String,Any>] {
+                        let playitem = PlayItem.init(with: item )
+                        items.append(playitem)
+                    }
+                    var playname = key as! String
+                    var nbr = 0
+                    while true {
+                        if playlists[playname] == nil
+                        {
+                            break
                         }
-                        let name = play[k.name] as? String
-                        if let items = playlists[name!] {
-                            for item in items as! [PlayItem] {
-                                list.append(item)
-                            }
+                        else
+                        {
+                            nbr += 1
+                            playname = String(format: "%@%@", key as! String,
+                                              (nbr == 0 ? "" : String(format: "-%ld", nbr)))
                         }
-                        playlists[name!] = list
-                    }
-                }
-                if let urlString = dict.value(forKey: "fileURL") {
-                    self.fileURL = URL(string: (urlString as AnyObject).addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlQueryAllowed)!)!
-                    self.fileType = self.fileURL?.pathExtension
+                    }
+                    playlists[playname] = items
                 }
             }
         }

                    }
                }
                
                if let fileURL = dict.value(forKey: "fileURL") {
                    self.fileURL = URL(string: (fileURL as! String).addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlQueryAllowed)!)!
                    self.fileType = self.fileURL?.pathExtension
                    break;
                }
            }

        self.trans = trans
        super.init()
    }
    init(with dictionary: Dictionary<String,Any>) {
        let plist = dictionary as NSDictionary
        self.name = plist[k.name] as! String
        self.link = URL.init(string: plist[k.link] as! String)!
        self.time = (plist[k.time] as AnyObject).timeInterval ?? 0.0
        self.rank = (plist[k.rank] as AnyObject).intValue ?? 0
        self.rect = (plist[k.rect] as AnyObject).rectValue ?? NSZeroRect
        self.label = (plist[k.label] as AnyObject).boolValue ?? false
        self.hover = (plist[k.hover] as AnyObject).boolValue ?? false
        self.alpha = (plist[k.alpha] as AnyObject).floatValue ?? 0.6
        self.trans = (plist[k.trans] as AnyObject).intValue ?? 0
    }

    override var description : String {
        return String(format: "%@: %p '%@'", self.className, self, name)
    }
    
    required convenience init(coder: NSCoder) {
        let name = coder.decodeObject(forKey: k.name) as! String
        let link = URL.init(string: coder.decodeObject(forKey: k.link) as! String)
        let time = coder.decodeDouble(forKey: k.time)
        let rank = coder.decodeInteger(forKey: k.rank)
        let rect = NSRectFromString(coder.decodeObject(forKey: k.rect) as! String)
        let label = coder.decodeBool(forKey: k.label)
        let hover = coder.decodeBool(forKey: k.hover)
        let alpha = coder.decodeFloat(forKey: k.alpha)
        let trans = coder.decodeInteger(forKey: k.trans)
        self.init(name: name, link: link!, time: time, rank: rank, rect: rect,
                  label: label, hover: hover, alpha: alpha, trans: trans)
    }
    
    func encode(with coder: NSCoder) {
        coder.encode(name, forKey: k.name)
        coder.encode(link, forKey: k.link)
        coder.encode(time, forKey: k.time)
        coder.encode(rank, forKey: k.rank)
        coder.encode(NSStringFromRect(rect), forKey: k.rect)
        coder.encode(label, forKey: k.label)
        coder.encode(hover, forKey: k.hover)
        coder.encode(alpha, forKey: k.alpha)
        coder.encode(trans, forKey: k.trans)
    }
    
    func dictionary() -> Dictionary<String,Any> {
        var dict: Dictionary<String,Any> = Dictionary()
        dict[k.name] = name
        dict[k.link] = link.absoluteString
        dict[k.time] = time
        dict[k.rank] =  rank
        dict[k.rect] = NSStringFromRect(rect)
        dict[k.label] = label
        dict[k.hover] = hover
        dict[k.alpha] = alpha
        dict[k.trans] = trans
        return dict
    }
}

