         presentingNavController!.popToRootViewControllerAnimated(false)
         navigationController?.dismissViewControllerAnimated(true, completion: nil)
     }
-    
-    func emptyFields() {
-        usernameTextField.text = ""
-        passwordTextField.text = ""
-        confirmPasswordTextField.text = ""
-        firstNameTextField.text = ""
-        lastNameTextField.text = ""
-    }
-    
-    func isEditProfile() -> Bool {
-        return profile != nil
-    }
-    
-    func configureView() {
-        if (isEditProfile()) {
-            passwordTextField.removeFromSuperview()
-            confirmPasswordTextField.removeFromSuperview()
-            passwordLabel.removeFromSuperview()
-            confirmPasswordLabel.removeFromSuperview()
-            button.setTitle("Save", forState: UIControlState.Normal)
-            
-            usernameTextField.text = profile.username
-            firstNameTextField.text = profile.firstName
-            lastNameTextField.text = profile.lastName
-        }
-    }
 }
-

        fatalError("init(coder:) has not been implemented")
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        configureView()

        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    // MARK: Le Management Des Views
    
    func configureView() {
        if (isEditProfile()) {
            passwordTextField.removeFromSuperview()
            confirmPasswordTextField.removeFromSuperview()
            passwordLabel.removeFromSuperview()
            confirmPasswordLabel.removeFromSuperview()
            button.setTitle("Save", forState: UIControlState.Normal)
            
            usernameTextField.text = profile.username
            firstNameTextField.text = profile.firstName
            lastNameTextField.text = profile.lastName
        }
    }
    
    func emptyFields() {
        usernameTextField.text = ""
        passwordTextField.text = ""
        confirmPasswordTextField.text = ""
        firstNameTextField.text = ""
        lastNameTextField.text = ""
    }
    
    func isEditProfile() -> Bool {
        return profile != nil
    }

    // MARK: Les Actions
    
    @IBAction func buttonTapped(sender: AnyObject) {
        if isEditProfile() {
            saveProfile()
