   if (encoderSignalA == HIGH)
   {
     degreesEncoder = degreesEncoder + DEGREE_STEP;
-  }  
+  }
   else if (encoderSignalA == LOW)
   {
     degreesEncoder = degreesEncoder - DEGREE_STEP;
   }
-  
-  if (degreesEncoder > DEGREE_LIMIT_MAX) 
+
+  if (degreesEncoder > DEGREE_LIMIT_MAX)
   {
     degreesEncoder = DEGREE_LIMIT_MIN;
   }

  {
    degreesEncoder = degreesEncoder - DEGREE_STEP;
  }
  
  // Correct the number of degrees if it's beyond limits
  if (degreesEncoder > DEGREE_LIMIT_MAX) 
  {
    degreesEncoder = DEGREE_LIMIT_MIN;
  }

  if (encoderSignalA == LOW)
  {
    degreesEncoder = degreesEncoder + DEGREE_STEP;
  }
  else if (encoderSignalA == HIGH)
  {
    degreesEncoder = degreesEncoder - DEGREE_STEP;
  }

  if (degreesEncoder > DEGREE_LIMIT_MAX)
  {
    degreesEncoder = DEGREE_LIMIT_MIN;
  }
