     }
     
     private func checkPermission() {
-        if (self.manager.hasPermission()) {
-            self.loadContactsButton.enabled = true
+        if (manager.hasPermission()) {
+            loadContactsButton.enabled = true
         } else {
-            self.manager.requestAuthorization { (isGranted, permissionError) -> () in
+            manager.requestAuthorization { [weak self](isGranted, permissionError) -> () in
                 dispatch_async(dispatch_get_main_queue(), { () -> Void in
                     if (isGranted) {
-                        self.loadContactsButton.enabled = true
+                        self?.loadContactsButton.enabled = true
                     } else {
-                        self.permissionNoticeLabel.hidden = false
+                        self?.permissionNoticeLabel.hidden = false
                     }
                 })
             }

    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.checkPermission()
    }

    override func didReceiveMemoryWarning() {

    private func showContacts() {
        let mainStoryboard = UIStoryboard(name: "Main", bundle: nil);
        let contactViewController = mainStoryboard.instantiateViewControllerWithIdentifier("sidContactsViewController") as! UIViewController
        parentViewController?.showViewController(contactViewController, sender: self)
    }

}
