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

        self.repetitions = repeatCount;
        self.position = position
        
        Async.background {
            self.setupAnimationGroup()
            self.setPulseRadius(self.radius)
            
            if (self.pulseInterval != Double.infinity) {
                Async.main {
                    self.addAnimation(self.animationGroup, forKey: "pulse")
                }
            }
        }
    }

    required init(coder aDecoder: NSCoder) {

    
    func setPulseRadius(radius: CGFloat) {
        self.radius = radius
        let tempPos = self.position
        let diameter = self.radius * 2
        
        self.bounds = CGRect(x: 0.0, y: 0.0, width: diameter, height: diameter)
        self.cornerRadius = self.radius
