 import UIKit
 
 class CardsViewController: UIViewController {
+  
+  struct Card {
+    let cardView: CardView
+    let swipeView: SwipeView
+  }
+  
   let frontCardTopMargin: CGFloat = 0.0
   let backCardTopMargin: CGFloat = 10.0
 
   @IBOutlet weak var cardStackView: UIView!
   
-  var backCard: SwipeView?
-  var frontCard: SwipeView?
+  var backCard: Card?
+  var frontCard: Card?
   
   override func viewDidLoad() {
     super.viewDidLoad()

  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()
    }
  }
}
