 int targetSpeed = 0;
 int currentSpeed = 0;
 int delayBetweenMotorUpdates = 15;
-unsigned long lastMotorUpdateTime = 0;
 boolean powerEnabled = false;
 int targetDirection = CLOCKWISE;
 int currentDirection = CLOCKWISE;
 volatile int motorTicks = 0;
-unsigned long lastClockTickTime = 0;
-unsigned long lastDisplayTime = 0;
 unsigned long secondsOfOperation = 0;
 uint32_t* nextClockBufferLocation = 0;
 boolean showDebugDisplay = false;
+unsigned long lastDisplayTime = 0;
+
+Thread motorUpdateTask = Thread();
+Thread displayUpdateTask = Thread();
+Thread clockUpdateTask = Thread();
+ThreadController taskController = ThreadController();
 
 void setup()
 {  

  lcd.print(versionString);
  delay(2000);
  lcd.clear();
}

void loop()
{
  HandleInputs();
  
  SetMotorState();
    
  UpdateClock();
  UpdateDisplay();
}

void HandleInputs()

  lcd.home();
  lcd.print(F("RPM: "));
  lcd.print(rpmToString((int)rpm, buffer));

  lastDisplayTime = now;
}

void UpdateDirectionDisplay()
