 import UIKit
 
 
-public enum TransitionType {
-    case Push
-    case Pop
-    case Interactive
-}
-
-enum TransitionState {
-    case Initial
-    case Finished
-    case Cancelled
-}
-
 public class SplitTransition: UIPercentDrivenInteractiveTransition {
+
+    public enum TransitionType {
+        case Push
+        case Pop
+        case Interactive
+    }
+
+    enum TransitionState {
+        case Initial
+        case Finished
+        case Cancelled
+    }
+
     /**
      * The duration (in seconds) of the transition.
      */

        }
    }

    /***/
    private var initialPan: Bool = true

    /***/
    private var gestureRecognizer: UIPanGestureRecognizer?

    /***/
    private var transitionContext: UIViewControllerContextTransitioning?

    /***/
    private var previousTouchLocation: CGPoint?

    /***/
    private var container: UIView?

    /***/
    private var toVC: UIViewController?

    /***/
    private var fromVC: UIViewController?

    /***/
    private var completion: (() -> ())?

    /**
     * Screen capture extending from split location
     * to bottom of screen
     */
    lazy var bottomSplitImageView: UIImageView = {
        let imageView = UIImageView()
        imageView.image = self.screenCapture
        imageView.contentMode = .Bottom
        imageView.clipsToBounds = true
        return imageView
    }()

    /**
     *  Optional capture of entire screen

                    break
                case .Cancelled:
                    previousTouchLocation = nil
            }
        }
    }

    /**
    * Transition progress in UIPoints (essentially, distance scrolled from splitLocation)
    */
    private var transitionProgress: CGFloat = 0.0 {
        didSet {
            // Calculate how much of the bottom and top screenshots have been scrolled off-screen
