     public func dismiss() {
         if let actionSheet = self.actionSheet {
             actionSheet.dismissWithClickedButtonIndex(sources.count, animated: false)
-        }
-        else if imagePicker != nil {
+        } else {
             imagePicker.dismissViewControllerAnimated(false, completion: nil)
-        }
-        else {
-            NSLog("Other view")
         }
     }
 }
 
 extension FDTakeController : UIActionSheetDelegate {
     public func actionSheet(actionSheet: UIActionSheet, didDismissWithButtonIndex buttonIndex: Int) {
-        var aViewController: UIViewController = self.topViewController(self.presentingViewController)
+        let aViewController: UIViewController = self.topViewController(self.presentingViewController)
         if buttonIndex == actionSheet.cancelButtonIndex {
             self.didDeny?()
         } else {

extension FDTakeController : UIImagePickerControllerDelegate {
    public func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
        UIApplication.sharedApplication().statusBarHidden = true
        var mediaType: String = info[UIImagePickerControllerMediaType] as! String
        var imageToSave: UIImage
        // Handle a still image capture
        if mediaType == kUTTypeImage as String {

    
    private lazy var popover: UIPopoverController = {
        [unowned self] in
        return UIPopoverController(contentViewController: self.imagePicker)
    }()
    
    private var actionSheet: UIActionSheet? = nil
