     }
     
     func createScaleAnimation() -> CABasicAnimation {
-        var scaleAnimation = CABasicAnimation(keyPath: "transform.scale.xy")
+        let scaleAnimation = CABasicAnimation(keyPath: "transform.scale.xy")
         scaleAnimation.fromValue = NSNumber(float: self.fromValueForRadius)
         scaleAnimation.toValue = NSNumber(float: 1.0)
         scaleAnimation.duration = self.animationDuration

        self.animationGroup.removedOnCompletion = false
        
        if self.useTimingFunction {
            var defaultCurve = CAMediaTimingFunction(name: kCAMediaTimingFunctionDefault)
            self.animationGroup.timingFunction = defaultCurve
        }
        

    }
    
    func createOpacityAnimation() -> CAKeyframeAnimation {
        let opacityAnimation = CAKeyframeAnimation(keyPath: "opacity")
        opacityAnimation.duration = self.animationDuration
        opacityAnimation.values = [self.fromValueForAlpha, 0.8, 0]
        opacityAnimation.keyTimes = [0, self.keyTimeForHalfOpacity, 1]
