     }
 }
 
-extension Manager {
-
-    func setup(context: UIViewControllerContextTransitioning) {
-        let fromVC: UIViewController = context.viewControllerForKey(UITransitionContextFromViewControllerKey)!
-        let toVC: UIViewController = context.viewControllerForKey(UITransitionContextToViewControllerKey)!
-
-        _setupTasks(fromVC: fromVC as? Delegate, toVC: toVC as? Delegate)
-    }
-
-    func _setupTasks(#fromVC: Delegate?, toVC: Delegate?) {
-        // before
-        if let tasks = fromVC?.tasksBeforeTransition?(operation) {
-            before.tasks = tasks
-        }
-
-        // present
-        var tasks: [Task] = [Task]()
-        if let ts = fromVC?.tasksDuringTransition?(operation) {
-            tasks += ts
-        }
-        if let ts = toVC?.tasksDuringTransition?(operation) {
-            tasks += ts
-        }
-
-        present.tasks = tasks
-    }
-}
-
 extension Manager: UIViewControllerAnimatedTransitioning {
 
     func animateTransition(context: UIViewControllerContextTransitioning) {

            finish()
        }

        for task: Task in tasks {
            task.delegate = self
            task.start()
        }

        }

        let after = delay * Double(NSEC_PER_SEC)
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(after)), dispatch_get_main_queue()) {
            self._start()
        }
    }

    private func _start() {
        if let layer = layer, let animation = animation {
            layer.addAnimation(animation, forKey: animation.keyPath.hash.description)
            layer.setValue(animation.valueAfterAnimation, forKeyPath: animation.keyPath)
        } else {
            finish()
        }
