   private func createCardFrame(topMargin: CGFloat)->CGRect {
     return CGRect(x: 0, y: topMargin, width: cardStackView.frame.width, height: cardStackView.frame.height)
   }
+  
+  private func createCard(topMargin: CGFloat) -> Card {
+    let cardView = CardView()
+    let swipeView = SwipeView(frame: createCardFrame(topMargin))
+    swipeView.delegate = self
+    swipeView.innerView = cardView
+    return Card(cardView: cardView, swipeView: swipeView)
+  }
 }
 
 //MARK: - SwipeViewDelegate

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

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