 
 // Modify clock display.
 void modifyClock() {
-  String time = getClockTime();
-  
-  if (time == "done")
-  {
-    myTimer.disable(timerId);
-    onTimerEnd();
-  }
-  else
-  {
-    mySerial.write(22);                   // no cursor
-    mySerial.write(12);                   // clear
-    mySerial.println(strTitle);           // first line, display title
-    mySerial.write(148);                  // new line
-    mySerial.print(time + " PK");         // second line, display time and initials
-    Serial.println("Time: " + time);      // console debug
-  }
-}
-
-// Get time left in DD:HH:MM:SS format.
-String getClockTime() {
-  int m = 0, h = 0, d = 0;
   double s;
   
   seconds--;  //update seconds

// objects
SoftwareSerial mySerial = SoftwareSerial(255, lcdPin);
SimpleTimer myTimer;
int timerId;                                  // reference to clock timer

// Configure display and timer.
void setup() {
  pinMode(lcdPin, OUTPUT);                           // set lcdPin as output to LCD
  mySerial.begin(9600);                              // start serial
  timerId = myTimer.setInterval(1000, modifyClock);  // update clock every 1 sec
  setupTime();                                       // setup time left
  delay(100);
}

// Run the timer.

  }
  
  // calc days left
  int d = dMax - days;
  strTime = getClockTime(d);
  
  if (d < 0) {
    // timer done
    myTimer.disable(timerId);
    myTimer.disable(timerId2);
    myTimer.disable(timerId3);
    onTimerEnd();
  }
  else {
    mySerial.write(22);                   // no cursor
    mySerial.write(12);                   // clear
    mySerial.println(strTitle);           // first line, display title
    mySerial.write(148);                  // new line
    
    int spaceCount = 16 - strTime.length() - 2;
    String strSpace = "";
    for (int i = 0; i < spaceCount; i++) {
      strSpace += " ";
    }
    
    strLine2 = strTime + strSpace + "PK";
    
    mySerial.print(strLine2);      // second line, display time and initials
    Serial.println("Time: " + strTime);   // console debug
  }
}

void flashLED() {
  int ledState = digitalRead(onBoardLEDPin);
  if (ledState == HIGH) {
    digitalWrite(onBoardLEDPin, LOW);
  }
  else if (ledState == LOW) {
    digitalWrite(onBoardLEDPin, HIGH);
  }
}

void updateTitle() {
  strTitle = strTitle.charAt(strTitle.length() - 1) + strTitle.substring(0, strTitle.length() - 1);
  
  mySerial.write(22);                   // no cursor
  mySerial.write(12);                   // clear
  mySerial.println(strTitle);           // first line, display title
  mySerial.write(148);                  // new line
  
  int spaceCount = 16 - strTime.length() - 2;
  String strSpace = "";
  for (int i = 0; i < spaceCount; i++) {
    strSpace += " ";
  }
  
  strLine2 = strTime + strSpace + "PK";
  
  mySerial.print(strLine2);      // second line, display time and initials
  Serial.println("Time: " + strTime);   // console debug
}

// Get time left in DD:HH:MM:SS format.
String getClockTime(int daysLeft) {
  // calc seconds left
  double s = seconds;
  
  // calc minutes left
  int m = (int)(s / 60);
  s -= m * 60;
  
  // calc hours left
  int h = (int)(m / 60);
  m -= h * 60;
  
  // format DD:HH:MM:SS
  String strD = printDigits(daysLeft, true);
  String strH = printDigits(h, true);
  String strM = printDigits(m, true);
  String strS = printDigits((int)s, false);
