      
      */
     public init(duration: TimeInterval, delay: TimeInterval = 0.0, options: UIViewAnimationOptions = [], animationBlock: @escaping AnimationBlock) {
-        animations.enqueue(data: [.animation(StandardAnimation(duration: duration, delay: delay, options: options, animationBlock: animationBlock))])
+        operations.enqueue(data: [.animation(StandardAnimation(duration: duration, delay: delay, options: options, animationBlock: animationBlock))])
     }
     
     /**

                    
                    // Basic and other custom animations must have their animations self contained within the animation block.
                    
                    // Capture the previous animation block to retain it on the next call. This requires the delay to be sorted in order to ensure the callback are called in the correct order.
                    let currentAnimationBlock = animationBlock
                    
                    animationBlock = { [weak self] in
                        currentAnimationBlock?()
                        self?.animationBlock = nil
                        animation.animationBlock()
                    }
                    
                    if #available(iOS 10.0, *) {
                        Timer.scheduledTimer(withTimeInterval: animation.delay, repeats: false) { [weak self] (timer) in
                            self?.animationBlock?()
                        }
                    } else {
                        Timer.scheduledTimer(timeInterval: animation.delay, target: self, selector: #selector(Animate.animationBlock(_:)), userInfo: nil, repeats: false)
                    }
                    
                    // Capture the previous completion block to retain it on the next call. This requires the delay to be sorted in order to ensure the callback are called in the correct order.
                    let currentCompletionBlock = completionBlock
                    
                    // Completion implementation
                    completionBlock = {  [weak self] in
                        currentCompletionBlock?()
                        self?.completionBlock = nil
                        group.leave()
                    }
                    

                 // key frame animation
             }
         ])
         .perform()
     ```
     
     - parameter keyframes: An array of `Keyframe` objects representing the keyframes to be animated.
     - parameter options: The `UIViewKeyframeAnimationOptions` to apply to the animation.
     
     - returns: The current animation instance.
     
     - warning: Not calling decay, finish or perform on an animation will result in a memory leak!
     */
    open func add(keyframes: [Keyframe], options: UIViewKeyframeAnimationOptions = []) -> Animate {
        
        switch operations.last {
        case .some:
            operations.last!.data.append(.animation(KeyframeAnimation(keyframes: keyframes, options: options)))
        case .none:
            operations.enqueue(data: [.animation(KeyframeAnimation(keyframes: keyframes, options: options))])
        }
        
        return self
    }
    
    /**
     Adds a standard animation to the instance.
     ```
     // syntax:
     
     Animate(duration: time) {
             // Initial animation
         }
         .add(standardAnimation: standard)
         .perform()
     ```
     
     - parameter standardAnimation: A `StandardAnimation` object representing a standard animation.
     
     - returns: The current animation instance.
     
     - warning: Not calling decay, finish or perform on an animation will result in a memory leak!
     */
    open func add(standardAnimation: StandardAnimation) -> Animate {
        
        switch operations.last {
        case .some:
            operations.last!.data.append(.animation(standardAnimation))
        case .none:
            operations.enqueue(data: [.animation(standardAnimation)])
        }
        
        return self
    }
    
    /**
     Adds a spring animation to the instance.
     ```
     // syntax:
     
     Animate(duration: time) {
             // Initial animation
         }
         .add(springAnimation: spring)
         .perform()
     ```
     
     - parameter springAnimation: A `SpringAnimation` object representing a spring animation.
     
     - returns: The current animation instance.
     
     - warning: Not calling decay, finish or perform on an animation will result in a memory leak!
     */
    open func add(springAnimation: SpringAnimation) -> Animate {
        
        switch operations.last {
        case .some:
            operations.last!.data.append(.animation(springAnimation))
        case .none:
            operations.enqueue(data: [.animation(springAnimation)])
        }
        
        return self
    }
    
    /**
     Adds a keyFrame animation to the instance.
     ```
     // syntax:
     
     Animate(duration: time) {
             // Initial animation
         }
         .add(keyframe: keyframe)
         .perform()
     ```
     
     - parameter keyframeAnimation: A `KeyframeAnimation` object representing the keyframes to be animated.
     
     - returns: The current animation instance.
     
     - warning: Not calling decay, finish or perform on an animation will result in a memory leak!
     */
    open func add(keyframeAnimation: KeyframeAnimation) -> Animate {
        
        switch operations.last {
        case .some:
            operations.last!.data.append(.animation(keyframeAnimation))
        case .none:
            operations.enqueue(data: [.animation(keyframeAnimation)])
        }
        
        return self
    }
    
    /**
     Adds a basic animation to the instance.
     ```
     // syntax:
     
     let aView = UIView()
     
     let basic = BasicAnimation.cornerRadius(view: aView, duration: 1.0, delay: 0.0, radius: 10.0, timing: .easeInOut)
     
     Animate(duration: time) {
             // Initial animation
         }
         .add(basicAnimation: basic)
         .perform()
     ```
     
     - parameter basicAnimation: Takes a `BasicAnimation` object.
     
     - returns: The current animation instance.
     
     - warning: Not calling decay, finish or perform on an animation will result in a memory leak!
     */
    open func add(basicAnimation: BasicAnimation) -> Animate {
        
        switch operations.last {
        case .some:
            operations.last!.data.append(.animation(basicAnimation))
        case .none:
            operations.enqueue(data: [.animation(basicAnimation)])
        }
        
        return self
    }
    
    /**
     Adds a finishing animation and then immediately calls perform on the animation instance.
     ```
     // syntax:
     
     Animate(duration: time) {
             // Perform initial animation
         }
         .finish(duration: time) {
             // Perform finishing animation
         }
     ```
     
     - parameter duration: The duration that the animation should take.
     - parameter delay: Takes a time interval to delay the animation.
     - parameter options: Takes a set of UIViewAnimationOptions. Default is none.
     - parameter animationBlock: `Animation` callback to perform over the duration passed in.
     
     - warning: Not calling decay, finish or perform on an animation will result in a memory leak!
     */
    open func finish(duration: TimeInterval, delay: TimeInterval = 0.0, options: UIViewAnimationOptions = [], animationBlock: @escaping AnimationBlock) {
        operations.enqueue(data: [.animation(StandardAnimation(duration: duration, delay: delay, options: options, animationBlock: animationBlock))])
        perform()
    }
    
    /**
     Adds a finishing animation and then immediately calls perform on the animation instance.
     ```
     // syntax:
     
     Animate(duration: time) {
             // Perform initial animation
         }
         .finish(duration: time, springDamping: 0.8, initialVelocity: 0.0) {
             // Perform finishing animation
         }
     ```
     
     - parameter duration: The duration that the animation should take.
     - parameter delay: Takes a time interval to delay the animation.
     - parameter springDamping: Takes the spring damping for the animation. 1.0 gives a smooth animation with a number closer to 0.0 having higher oscillation.
     - parameter initialVelocity: The initial velocity for the view as a ratio of it's distance to it's final position in points per second. If the distance is 200 points then an initial velocity of 0.5 would be 100 points per second.
     - parameter options: Takes a set of UIViewAnimationOptions. Default is an empty array.
     - parameter animationBlock: `Animation` callback to perform over the duration passed in.
     
     - warning: Not calling decay, finish or perform on an animation will result in a memory leak!
     */
    open func finish(duration: TimeInterval, delay: TimeInterval = 0.0, springDamping: CGFloat, initialVelocity: CGFloat, options: UIViewAnimationOptions = [], animationBlock: @escaping AnimationBlock) {
        operations.enqueue(data: [.animation(SpringAnimation(duration: duration, delay: delay, damping: springDamping, velocity: initialVelocity, options: options, animationBlock: animationBlock))])
        perform()
    }
    
    /**
     Follows the previous animation with a keyframe animation and calls perform on the instance.
     ```
     // syntax:
     
     Animate()
         .finish(keyframes: [
             KeyFrame(duration: 1.0) {
                 // key frame animation
             },
             KeyFrame(duration: 1.0, delay: 0.5) {
                 // key frame animation
             },
             KeyFrame(duration: 1.5) {
                 // key frame animation
             }
         ])
     ```
     
     - parameter keyframes: An array of `Keyframe` objects representing the keyframes to be animated.
     - parameter options: The `UIViewKeyframeAnimationOptions` to apply to the animation.
     
     - returns: The current animation instance.
     
     - warning: Not calling decay, finish or perform on an animation will result in a memory leak!
     */
    open func finish(keyframes: [Keyframe], options: UIViewKeyframeAnimationOptions = []) {
        operations.enqueue(data: [.animation(KeyframeAnimation(keyframes: keyframes, options: options))])
        perform()
    }
    
