     var connectorLayer: CAShapeLayer?
     var selectedLayer: CALayer?
     var point: CGPoint?
-    var movingView: UIView?
+    var movingView: UIView!
     var angle: CGFloat = 0.1
 
     // MARK: - Initialization


        translatesAutoresizingMaskIntoConstraints = false
        movingView = UIView(frame: frame)
        movingView?.isUserInteractionEnabled = false
        movingView?.translatesAutoresizingMaskIntoConstraints = false
        addSubview(movingView!)
        addConstraints([
            NSLayoutConstraint(item: movingView!, attribute: .width, relatedBy: .equal,
                               toItem: self, attribute: .width, multiplier: 1, constant: 0),
            NSLayoutConstraint(item: movingView!, attribute: .height, relatedBy: .equal,
                               toItem: self, attribute: .height, multiplier: 1, constant: 0),
            NSLayoutConstraint(item: movingView!, attribute: .centerX, relatedBy: .equal,
                               toItem: self, attribute: .centerX, multiplier: 1, constant: 0),
            NSLayoutConstraint(item: movingView!, attribute: .centerY, relatedBy: .equal,
                               toItem: self, attribute: .centerY, multiplier: 1, constant: 0)])
    }

    override open func layoutSubviews() {
        calculateElementSizes()
        super.layoutSubviews()
        self.bringSubview(toFront: movingView!)
    }

    // MARK: - Tracking user actions


        let angle = valueToRadians(diff)
        dot2Layer = drawDot(angle, rect: rect, color: UIColor.orange)
        movingView.layer.addSublayer(dot2Layer!)
    }

    func drawDot(_ angle: CGFloat, rect: CGRect, color: UIColor) -> CALayer {
