                 ani.duration = CFTimeInterval(1.0 / ani.repeatCount)
                 ani.fillMode = kCAFillModeBoth
                 layer.addAnimation(ani, forKey: "transform")
-            } else if type == "shift" {
+            case "shift":
                 let shiftLayer = (innerLayer == nil) ? layer : innerLayer!
                 let ani = CAKeyframeAnimation(keyPath: "transform")
                 let shift:CGSize = {

                ani.duration = CFTimeInterval(1.0 / ani.repeatCount)
                ani.fillMode = kCAFillModeBoth
                layer.addAnimation(ani, forKey: "opacity")
            } else if type == "wiggle" {
                let delta = valueFrom(animation, key: "delta", defaultValue: 15) * CGFloat(M_PI / 180.0)
                let ani = CAKeyframeAnimation(keyPath: "transform")
                ani.values = [NSValue(CATransform3D:layer.transform),

                ani.duration = CFTimeInterval(1.0 / ani.repeatCount)
                ani.fillMode = kCAFillModeBoth
                shiftLayer.addAnimation(ani, forKey: "transform")
            case "blink":
                let ani = CAKeyframeAnimation(keyPath: "opacity")
                ani.values = [1.0, 0.0, 1.0]
                ani.repeatCount = repeatCount
