     
     // Move all subviews to newSuperview
     for subview in fromView.subviews {
-      if let currentSubview = subview as? UIView {
-        if currentSubview == newSuperview { continue }
-        newSuperview.addSubview(currentSubview)
+      if let subview = subview as? UIView {
+        if subview == newSuperview { continue }
+        newSuperview.addSubview(subview)
       }
     }
     

  class func moveConstraints(fromView: UIView, toView: UIView) {
    let constraints = fromView.constraints()
    for constraint in constraints {
      if let currentConstraint = constraint as? NSLayoutConstraint {
        moveConstraint(currentConstraint, fromView: fromView, toView: toView)
      }
    }
  }

  private class func moveConstraint(constraint: NSLayoutConstraint,
    fromView: UIView, toView: UIView) {
      
      if let firstItem = constraint.firstItem as? NSObject {
        
        let newFirstItem = firstItem == fromView ? toView : firstItem
        
        if let secondItem = constraint.secondItem as? NSObject {
          let newSecondItem = secondItem == fromView ? toView : secondItem
          
          let newConstraint = NSLayoutConstraint(
            item: newFirstItem,
