   if(currentState == NORMAL){   
     if(showLCD){
       LowPower.powerDown(SLEEP_15Ms, ADC_OFF, BOD_OFF);
-    }else {
+    }
+    else {
       LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
     }
 




    writeVoltageAndTempToDisplayBuffer(batteryMilliVolt, celsius);
    writeButtonStateToDisplayBuffer(blinkOn);




  //Cast to long as Arduino int is only 16 bits wide. Not enough to hold this result
  long numerator =  ((long) ((batteryMilliVolt - MIN_BATTERY_MILLIVOLT))) * 100;

  if(currentState != SETTING_TIME || settingTimeProcess != T_VOLTAGE || blinkOn){

    if(showVoltage){
        uView.setCursor(35,32);
        float batteryVolt = batteryMilliVolt / 1000.0;
        uView.print(batteryVolt);
        uView.print("V");
    } 
    else {

      int batteryPercent = numerator / batteryRange;


      batteryPercent = getNewAverageReadingFromCurrentReading(percentReadings, &percentIndex, &percentTotal, numReadings, batteryPercent);

      if(batteryPercent < 0 || batteryPercent >= 100){
        uView.setCursor(35,32);
      } 
      else {
        uView.setCursor(47,32);
      }

      uView.print(batteryPercent);
      uView.print("%");
    }
  }
}

void writeButtonStateToDisplayBuffer(boolean blinkOn){
