 long lastClick = 0;
 long lastBlink = 0;
 long lastStatus = 0;
-long last_mem[NUMBER_MEM_BUTTONS];
 
 boolean blinkState = false;
 boolean statusDisplayed = false;
-boolean mem_armed[NUMBER_MEM_BUTTONS];
 
 int eeAddressStart = 0;
 int threshold = 0;

      last_mem[buttons] = millis();
    }
  }
  
  checkOutputLevel();
  wipeStaleStatus();
}

  }
}

//Handle Memory Button Pushes
void handleMemoryButtons() {

  static boolean mem_armed[NUMBER_MEM_BUTTONS];
  static long last_mem[NUMBER_MEM_BUTTONS];
  
  for (int buttons = 0; buttons < NUMBER_MEM_BUTTONS; buttons++) {   
    if(!mem_armed[buttons] && !digitalRead(MEM_BUTTON_START_PIN+buttons) && millis() - last_mem[buttons] > 50) {
      last_mem[buttons] = millis();
      mem_armed[buttons] = true;
