 
 // MARK: Public methods
 extension WRUserSettings {
-    public class func shared() -> Self {
-        return self.shared
-    }
-
     public func reset() {
         for (property, defaultValue) in defaultValues {
-            let value = NSKeyedUnarchiver.unarchiveObject(with: defaultValue)
+            let value = NSKeyedUnarchiver.object(data: defaultValue)
             self.setValue(value, forKey: property)
         }
     }

        }
    }

    fileprivate func userDefaultsKey(forProperty property: Property) -> String {
        return "\(uniqueIdentifierKey).\(property)"
    }

    private func saveDefaultValue(_ property: Property) {
        guard let object = self.value(forKeyPath: property) else { return }
        let archivedObject = NSKeyedArchiver.archivedData(withRootObject: object)
        defaultValues[property] = archivedObject
    }

    private func fillProperty(_ property: Property) {
        if let data = userDefaults.object(forKey: userDefaultsKey(forProperty: property)) as? Data {
            let value = NSKeyedUnarchiver.unarchiveObject(with: data)
            self.setValue(value, forKey: property)
        }
    }

import Foundation

public protocol SharedInstanceType: class {
    init(classType: AnyClass)
    func clearInstances()
}

private var userSettingsSingletons = [String: SharedInstanceType]()
