             trans = CGAffineTransform(translationX: size.width/2 - halfArrowSize + arrowOffset, y: 0)
         } else if (arrowPosition == .bottom) {
             rot = CGAffineTransform(rotationAngle: CGFloat.pi)
-            trans = CGAffineTransform(translationX: size.width/2 + halfArrowSize + arrowOffset, y: size.height + arrowSize)
+            trans = CGAffineTransform(translationX: size.width/2 + halfArrowSize + arrowOffset, y: size.height + arrowHeight)
         } else if (arrowPosition == .left) {
-            rot = CGAffineTransform(rotationAngle: CGFloat.pi * CGFloat(1.5))
-            trans = CGAffineTransform(translationX: 0, y: (size.height + arrowSize) / 2)
+            rot = CGAffineTransform(rotationAngle: CGFloat.pi * 1.5)
+            trans = CGAffineTransform(translationX: 0, y: (size.height + arrowHeight) / 2)
         } else if (arrowPosition == .right) {
-            rot = CGAffineTransform(rotationAngle: CGFloat.pi * CGFloat(0.5))
-            trans = CGAffineTransform(translationX: size.width + arrowSize, y: (size.height - arrowSize) / 2)
+            rot = CGAffineTransform(rotationAngle: CGFloat.pi * 0.5)
+            trans = CGAffineTransform(translationX: size.width + arrowHeight, y: (size.height - arrowHeight) / 2)
         }
         
         if let rotationTransform = rot {

        path.stroke()
        ctx.restoreGState()
    }

    func animate() {
        UIView.animate(withDuration: 2.0, delay: 0.3, options: [.repeat, .autoreverse], animations: {
            self.transform = CGAffineTransform(translationX: 0, y: -5)
        }, completion: nil)
    }
    
    /**
     Check if bubble is going off the screen using the position and size. If it is, return true
     */
    func fixFrameIfOutOfBounds() {
        guard let window = UIApplication.shared.keyWindow?.frame else {
            print("Couldn't get app window")


        // Tip of the arrow needs to be centered under highlighted region
        // This center area is always arrow size divided by 2
        let center = arrowHeight / 2

        //  points used to draw arrow
        //  Wide Arrow --> x = center + - ArrowSize
        //  Skinny Arrow --> x = center + - center
        //  Normal Arrow -->
        let startPoint = CGPoint(x: center - arrowHeight, y: arrowHeight)
        let midPoint = CGPoint(x: center, y: 0)
        let endPoint = CGPoint(x: center + arrowHeight, y: arrowHeight)

        let path = UIBezierPath()
        path.move(to: startPoint)
