 final class SYLayer {
     
     private var superLayer: CALayer!
-    private var textLayer = CATextLayer()
-    private var rippleLayer = CALayer()
+    
+    private var textLayer      = CATextLayer()
+    private var rippleLayer    = CALayer()
     private var subRippleLayer = CALayer()
     
-    private var borderColorAnimtion = CABasicAnimation()
-    private var borderWidthAnimation = CABasicAnimation()
-    private var shadowAnimation = CABasicAnimation()
-    private var backgroundColorAnimation = CABasicAnimation()
-    private var textColorAnimation = CABasicAnimation()
+    private var borderColorAnimtion  = CABasicAnimation(keyPath: AnimationKeyType.borderColor.keyPath)
+    private var borderWidthAnimation = CABasicAnimation(keyPath: AnimationKeyType.borderWidth.keyPath)
+    private var shadowAnimation      = CABasicAnimation(keyPath: AnimationKeyType.shadowOpacity.keyPath)
     
     private var animationBorderColor = AnimationDefaultColor.border {
         didSet {
-            borderColorAnimtion.toValue = animationBorderColor.CGColor
             animationShadowColor = animationBorderColor
         }
     }
-    private var animationTextColor = AnimationDefaultColor.text {
-        didSet {
-            textColorAnimation.toValue = animationTextColor.CGColor
-        }
-    }
-    private var animationBackgroundColor = AnimationDefaultColor.background {
-        didSet {
-            backgroundColorAnimation.toValue = animationBackgroundColor.CGColor
-        }
-    }
+    private var animationTextColor = AnimationDefaultColor.text
+    private var animationBackgroundColor = AnimationDefaultColor.background
     private var animationShadowColor = AnimationDefaultColor.border {
         didSet {
             superLayer.shadowColor = animationShadowColor.CGColor

    
    private func animateBackground() {
        let type: AnimationKeyType = .backgroundColor
        backgroundColorAnimation = CABasicAnimation(keyPath: type.keyPath)
        backgroundColorAnimation.fromValue      = type.fromValue
        backgroundColorAnimation.toValue        = animationBackgroundColor.CGColor
        backgroundColorAnimation.duration       = animationDuration

        resetSuperLayerShadow()
    }
    
    private func configureBorderAnimation() {
        configureBorderColorAnimation()
        configureBorderWidthAnimation()
    }
    
    private func configureBorderWithShadowAnimation() {
        configureBorderColorAnimation()
        configureShadowAnimation()
        configureBorderWidthAnimation()
    }
    
    private func configureBorderColorAnimation() {
        borderColorAnimtion.fromValue = AnimationKeyType.borderColor.fromValue
        borderColorAnimtion.toValue   = animationBorderColor.CGColor
    }
    
    private func configureBorderWidthAnimation() {
        borderWidthAnimation.fromValue = AnimationKeyType.borderWidth.fromValue
        borderWidthAnimation.toValue   = AnimationConstants.borderWidth
    }
    
    private func configureShadowAnimation() {
        shadowAnimation.fromValue = AnimationKeyType.shadowOpacity.fromValue
        shadowAnimation.toValue   = AnimationConstants.shadowOpacity
    }
    
