       presentViewController(popoverVC!, animated: true, completion: nil)
       
       
-    }
-      
-      //Do we want the password and confirmPassword trimmed?
-      //Confirm password
-    else if passwordTextField.text!.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet()) != confirmPasswordTextField.text!.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet()) {
-      
-      //            let alert = UIAlertView(title: "Confirm Password", message: "Please Confirm Your Password", delegate: self, cancelButtonTitle: "Dismiss")
-      //            alert.show()
-      
-      
-      //Create View Controller
+    }else if passwordTextField.text! != confirmPasswordTextField.text! {
+      
       let popoverVC = storyboard?.instantiateViewControllerWithIdentifier("confirmPopover")
-      
-      //Set it as popover
-      popoverVC!.modalPresentationStyle = .Popover
-      
-      //Set the size
+      popoverVC!.modalPresentationStyle = .Popover
       popoverVC!.preferredContentSize = CGSizeMake(250, 55)
       
       if let popoverController = popoverVC!.popoverPresentationController {

  
  //Registration
  @IBAction func submitToRegister(sender: AnyObject) {
    
    //Boolean to check text inputs
    var checkOK = false
    
    //Check inputs
    

        popoverController.sourceView = confirmPasswordTextField
        popoverController.sourceRect = confirmPasswordTextField.bounds
        
        //Popover above the textfield
        popoverController.permittedArrowDirections = .Down
        
        popoverController.delegate = self
      }
      
