 extension ARNTransitionAnimator {
     
     internal func handlePan(recognizer: UIPanGestureRecognizer) {
-        var window : UIWindow? = nil
-        
-        switch (self.interactiveType) {
+        let window : UIWindow?
+        switch self.interactiveType {
         case .Push, .Present:
             window = self.fromVC.view.window
         case .Pop, .Dismiss:

            }
        } else if recognizer.state == .Ended {
            var velocityForSelectedDirection: CGFloat = 0.0
            switch (self.direction) {
            case .Top, .Bottom:
                velocityForSelectedDirection = velocity.y
            case .Left, .Right:

        if recognizer.state == .Began {
            self.setPanStartPoint(location)
            
            if let c = self.contentScrollView where c.contentOffset.y <= 0.0 {
                self.startGestureTransition()
            } else {
                self.startGestureTransition()
            }
        } else if recognizer.state == .Changed {
            var bounds = CGRect.zero
            switch self.interactiveType {
            case .Push, .Present:
                bounds = self.fromVC.view.bounds
            case .Pop, .Dismiss:
