     
     @IBInspectable var color: UIColor? {
         didSet {
-            circlePathLayer.strokeColor = color?.CGColor
-            endCapLayer.fillColor = color?.CGColor
-            startCapLayer.fillColor = color?.CGColor
+            arcLayer.strokeColor = color?.CGColor
+            endLayer.fillColor = color?.CGColor
+            startLayer.fillColor = color?.CGColor
         }
     }
     
     @IBInspectable var lineWidth: CGFloat = 1 {
         didSet {
-            circlePathLayer.lineWidth = lineWidth
-            endCapLayer.path = endCapPath().CGPath
-            startCapLayer.path = endCapPath().CGPath
+            arcLayer.lineWidth = lineWidth
+            endLayer.path = endCapPath().CGPath
+            startLayer.path = endCapPath().CGPath
         }
     }
     
     @IBInspectable var shadowRadius: CGFloat = 10 {
         didSet {
-            endCapLayer.shadowRadius = shadowRadius
+            endLayer.shadowRadius = shadowRadius
         }
     }
 
     @IBInspectable var shadowOffset: CGSize = CGSizeZero {
         didSet {
-            endCapLayer.shadowOffset = shadowOffset
+            endLayer.shadowOffset = shadowOffset
         }
     }
 
     @IBInspectable var shadowOpacity: Float = 0.5 {
         didSet {
-            endCapLayer.shadowOpacity = shadowOpacity
+            endLayer.shadowOpacity = shadowOpacity
         }
     }
 
     @IBInspectable var shadowColor: UIColor? {
         didSet {
-            endCapLayer.shadowColor = shadowColor?.CGColor
-        }
-    }
-    
-    @IBInspectable var rotationDuration: Float = 0.5 {
-        didSet {
-//            endCapLayer.rotationDuration = rotationDuration
-//            circlePathLayer.rotationDuration = rotationDuration
-        }
-    }
-        
-    private let circlePathLayer = CAShapeLayer()
-    private let endCapLayer = CAShapeLayer()
-    private let startCapLayer = CAShapeLayer()
+            endLayer.shadowColor = shadowColor?.CGColor
+        }
+    }
+    
+    @IBInspectable var rotationDuration: Float = 0.5
+    
+    
+    
+    
+    private let arcLayer = CAShapeLayer()
+    private let endLayer = CAShapeLayer()
+    private let startLayer = CAShapeLayer()
     
     private var oldAngle: CGFloat = 0
     private var oldProgress: CGFloat = 0
     
+    
+    
     override init(frame: CGRect) {
         super.init(frame: frame)
         
-        circlePathLayer.strokeEnd = 0.0
+        // Make sure the initial value is 0
+        arcLayer.strokeEnd = 0.0
+        
         setupShapeLayers()
     }
+    
     
     required init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
 
-        circlePathLayer.strokeEnd = 0.0
+        // Make sure the initial value is 0
+        arcLayer.strokeEnd = 0.0
+        
         setupShapeLayers()
     }
+    
     
     override func layoutSubviews() {
         super.layoutSubviews()

        layer.addSublayer(shapeLayer)
    }

    private func reframeLayers(frame: CGRect) {
        reframeLayer(startCapLayer, frame: frame)
        startCapLayer.path = endCapPath().CGPath

        reframeLayer(circlePathLayer, frame: frame)
        circlePathLayer.path = circlePath().CGPath

        reframeLayer(endCapLayer, frame: frame)
        endCapLayer.path = endCapPath().CGPath
    }

    private func reframeLayer(layer: CAShapeLayer, frame: CGRect) {
        layer.bounds = CGRect(origin: CGPointZero, size: frame.size)
        layer.position = CGPoint(x: CGRectGetMidX(bounds), y: CGRectGetMidY(bounds))
    }
    
    private func circleFrame() -> CGRect {
        let radius = min(bounds.width / 2, bounds.height / 2)
        let frame = CGRect(origin: CGPointMake(bounds.width / 2, bounds.height / 2), size: CGSizeZero)

        return CGRectInset(frame, -radius, -radius)
    }
    
    private func circleRadius() -> CGFloat {
        let rect = circleFrame()

        return min(rect.width, rect.height) / 2.0 - lineWidth
    }

    private func circleCenter() -> CGPoint {
        let radius = circleRadius() + lineWidth
        return CGPointMake(radius, radius)
    }
    
    private func circlePath() -> UIBezierPath {
        let topAngle: CGFloat = CGFloat(-M_PI_2)
        let endAngle: CGFloat = CGFloat(2 * M_PI - M_PI_2)

        return path
    }

    
    /// A method for generating a UIBezierPath for a end cap layer
    ///
    /// - returns: A UIBezierPath that is a end cap that uses the current
    /// radius, and lineWidth.
    private func endCapPath() -> UIBezierPath {
        let c = circleCenter()
        let capCenter = CGPointMake(c.x, c.y - circleRadius())
