     // Do any additional setup after loading the view.
     cardStackView.backgroundColor = UIColor.clearColor()
     
-    backCard = SwipeView(frame: createCardFrame(backCardTopMargin))
-    backCard!.delegate = self
-    cardStackView.addSubview(backCard!)
+    backCard = createCard(backCardTopMargin)
+    cardStackView.addSubview(backCard!.swipeView)
     
-    frontCard = SwipeView(frame: createCardFrame(frontCardTopMargin))
-    frontCard!.delegate = self
-    cardStackView.addSubview(frontCard!)
+    frontCard = createCard(frontCardTopMargin)
+    cardStackView.addSubview(frontCard!.swipeView)
   }
   
   override func didReceiveMemoryWarning() {

  private func createCardFrame(topMargin: CGFloat)->CGRect {
    return CGRect(x: 0, y: topMargin, width: cardStackView.frame.width, height: cardStackView.frame.height)
  }
}

//MARK: - SwipeViewDelegate

  func swipedLeft() {
    println("left")
    if let frontCard = frontCard {
      frontCard.swipeView.removeFromSuperview()
    }
  }
  
  func swipedRight() {
    println("right")
    if let frontCard = frontCard {
      frontCard.swipeView.removeFromSuperview()
    }
  }
}
