 
     ///Called when the view moves (dragged by the user)
     @objc func panned(_ sender: UIPanGestureRecognizer) {
-        if sender.state == .began {
+        if sender.state == .began, let beginTimerSeeting = firstTimerSetting {
             delegate?.barcelonetaDidStartMoving(self)
             //The first set of the timer
-            addTimer(timerSettings[0].timer)
+            addTimer(beginTimerSeeting.timer)
             timerHasBeenCalledAtLeastOnce = false
         }
 
-        let translation = self.axis == .vertical ? sender.translation(in: self).y : sender.translation(in: self).x
+        let translationValue = self.axis == .vertical ? sender.translation(in: self).y : sender.translation(in: self).x
         //If ! movesUp, consider that the view moves down
-        movesUp = self.axis == .vertical ? (translation < 0) : (translation > 0)
-        //If the view is dragged beyond the draggingLimit (Up or down)
-        //too low
-        if translation > draggingLimit {
-            moveConstraint.constant = originalConstant + logConstraintValueForYPosition(translation)
-        } else if translation < (draggingLimit * -1.0) {
-            moveConstraint.constant = originalConstant + ((logConstraintValueForYPosition(translation * -1)) * -1)
-        } else {
-            moveConstraint.constant = originalConstant + translation
-        }
-
-        let prct = Int(100.0 / (draggingLimit/moveConstraint.constant))
-        percentage = prct < 0 ? prct * -1 : prct
+        movesUp = self.axis == .vertical ? (translationValue < 0) : (translationValue > 0)
+        moveConstraint.constant = movingValue(translation: translationValue,
+                                              limit: draggingLimit,
+                                              constant: originalConstant)
+        percentage = percentage(limit: draggingLimit, constant: moveConstraint.constant)
 
         //Find a timer setting matching the percentage
         if let timerSetting = timerSettings.filter({return $0.range ~= percentage}).first {

    fileprivate func decrement() {
        checkAndApply(value - incrementalValue)
    }
    /**
     Checks what to do with the new value, depending if loops or not
        - parameters:
          - newValue: The value to check and apply
     */
    func checkAndApply(_ newValue: Double) {
        var checkedValue = value
        if newValue > maximumValue {

            animateViewBackToOrigin()
        }
    }
    ///Computed var returning the optional first TimerSetting in the list.
    var firstTimerSetting: TimerSetting? {
        return timerSettings.first
    }
    ///Set to the original incremental value
    fileprivate func setDefaultIntervalSetting() {
        incrementalValue = timerSettings[0].increment
    }

    ///Sets the timer with the interval
    /// - Parameter interval: The double interval for executing the timer
    fileprivate func addTimer(_ interval: Double) {
        timer = Timer.scheduledTimer(timeInterval: interval,
                                     target: self,
