     killAllNotes();
 }
 
+unsigned long last_display_millis = 0;
 void update_bottom_display_line() {
+  // Debounce the call rate of this function to avoid flicker
+  if ((millis() - last_display_millis) < 250)
+    return;
+
   vfd.setCursor(0, 1);
   vfd.print("W:      ");
   vfd.setCursor(2, 1);
   vfd.print(interrupter_pulsewidth_setpoint);
   vfd.write(0xE4);
   vfd.print("s  ");
-}
-
-void midi_runloop() {
-  common();
-  update_bottom_display_line();
-  act_on_estop();
-}
-
-void loop() {
-  common();
-
-  // USB -> MIDI mode
-  if (system_mode == 2) {
-    init_mode("USB-MIDI");
-          
-    while (system_mode == 2) {
-      usbMIDI.read();
-      midi_runloop();
-    };
-  };
-
-  // MIDI Input Mode
-  if (system_mode == 1) {
-    init_mode("MIDI-RX");
-    
-    while (system_mode == 1) {
-      MIDI.read();
-      midi_runloop();
-    };
-  };
-  
-  // Pulse clock mode
+
   if (system_mode == 0) {
-    init_mode("PULSE");
-    
-    while (system_mode == 0) {
-      common();
-
-      update_bottom_display_line();      
-
       vfd.setCursor(8, 1);
       vfd.print("T:      ");
       vfd.setCursor(10, 1);

};

void common() {
  // Read the potentiometers, and set the pulsewidth setpoint
  // NOTE(meawoppl) - There is a brief time in which the pulsewidth
  // variable is set based on the input knob, but not constrained.  Dangerous.  
  interrupter_pulsewidth_setpoint = map(analogRead(pulsewidth_pot), ANALOG_SCALE_MAX, ANALOG_SCALE_MIN, PULSEWIDTH_MAX, PULSEWIDTH_MIN);
  interrupter_pulsewidth_setpoint = constrain(interrupter_pulsewidth_setpoint, 0, PULSEWIDTH_MAX);

  // Read the input switches, and set the global system_mode var
  uint8_t midi_mode_state  = digitalReadFast(midi_mode_switch);

        vfd.print(( (float) 1 / ((float)(pulse_duty_cycle_setpoint / (float) 1000000))  ));
        vfd.print("Hz   ");
      }
  }

  last_display_millis = millis();
}

void midi_runloop() {
  common();
  update_bottom_display_line();
  act_on_estop();
}

void loop() {
  common();

  // USB -> MIDI mode
  if (system_mode == 2) {
    init_mode("MIDI Mode (USB)");
          
    while (system_mode == 2) {
      usbMIDI.read();
      midi_runloop();
    };
  };

  // MIDI Input Mode
  if (system_mode == 1) {
    init_mode("MIDI Mode (PORT)");
    
    while (system_mode == 1) {
      MIDI.read();
      midi_runloop();
    };
  };
  
  // Pulse clock mode
  if (system_mode == 0) {
    init_mode("PULSE");
    
    while (system_mode == 0) {
      common();

      update_bottom_display_line();      

      // NOTE (meawoppl) - The knob readout is a bit noisy, so this if-block ignores dither
      if( (old_pulse_duty_cycle_setpoint + 2000) < pulse_duty_cycle_setpoint || 
          (old_pulse_duty_cycle_setpoint - 2000) > pulse_duty_cycle_setpoint ) {
        old_pulse_duty_cycle_setpoint = pulse_duty_cycle_setpoint;
