 import CLevelDB
 
 public typealias LevelDBKeyBlock = (String, UnsafeMutablePointer<Bool>) -> Void
-public typealias LevelDBKeyValueBlock = (String, AnyObject, UnsafeMutablePointer<Bool>) -> Void
-public typealias LevelDBLazyKeyValueBlock = (String, () -> AnyObject?, UnsafeMutablePointer<Bool>) -> Void
+public typealias LevelDBKeyValueBlock = (String, NSObject, UnsafeMutablePointer<Bool>) -> Void
+public typealias LevelDBLazyKeyValueBlock = (String, () -> NSObject?, UnsafeMutablePointer<Bool>) -> Void
 
 public class LevelDB {
     
     var name: String
     var path: String
-    public var encoder: (String, AnyObject) -> NSData?
-    public var decoder: (String, NSData) -> AnyObject?
+    public var encoder: (String, NSObject) -> NSData?
+    public var decoder: (String, NSData) -> NSObject?
     var db: UnsafeMutablePointer<Void>?
     
     // MARK: - Life cycle

        return decoder(key, data)
    }
    
    public func objectsForKeys(_ keys: [String]) -> [AnyObject?] {
        var result = [AnyObject?](count: keys.count, repeatedValue: nil)
        var index = 0
        for key in keys {
            result[index] = self[key]

                    print("Using a convenience encoder/decoder pair using NSKeyedArchiver.")
                })
            #endif
            return NSData(bytes: key.cString, length: key.length)
        }
        self.decoder = {(key: String, data: NSData) -> NSObject in
            return data
        }
        let dirpath = path.stringByDeletingLastPathComponent()
        let fm = NSFileManager.defaultManager()
