         }
     }
     
-    private func isPublishPermission(perm: String) -> Bool {
+    fileprivate func isPublishPermission(_ perm: String) -> Bool {
         return perm.hasPrefix("publish") || perm.hasPrefix("manage") || perm == "ads_management" || perm == "create_event" || perm == "rsvp_event"
     }
     
-    private let profile = ChangeKeeper<FBSDKProfile>()
-    private let accessToken = ChangeKeeper<FBSDKAccessToken>()
+    fileprivate let profile = ChangeKeeper<FBSDKProfile>()
+    fileprivate let accessToken = ChangeKeeper<FBSDKAccessToken>()
 }
 
 // MARK: - Helper
 
 class ChangeKeeper<T> {
-    private var current: T? = nil
-    private var listenersSet: [T! -> Void] = []
-    
-    func getCurrent(refresher: () -> Void, taker: T! -> Void) {
+    fileprivate var current: T? = nil
+    fileprivate var listenersSet: [(T?) -> Void] = []
+    
+    func getCurrent(_ refresher: () -> Void, taker: @escaping (T!) -> Void) {
         log("Get current(\(self)): \(current)")
         if let v = current {
             taker(v)

        }
    }
    
    private func permPublish(command: CDVInvokedUrlCommand, permissions: [String], finish: (() -> Void)? = nil) {
        FBSDKLoginManager.init().logInWithPublishPermissions(permissions)  { (result: FBSDKLoginManagerLoginResult!, err: NSError!) -> Void in
            log("Result of logInWithPublishPermissions: \(result), Error: \(err)")
            if err != nil {
                self.finish_error(command, msg: String(err))

        }
    }
    
    func listenOnSet(_ proc: @escaping (T!) -> Void) {
        listenersSet.append(proc)
    }
}
