     }
     // Check serial input.
     ProcessInput();
-    // Process the wells.
+    /**************************************
+      Process the wells.
+    ***************************************/
     for (int well = 0; well < nWells; well++) {
       WellDetectThrCheck(well);
       // if well is active, check to deliver reward


  Well_IR_State[well] = false;
  Well_Detect_State[well] = false;
  Well_IR_RefracTimeRef[well] = 0;
  ResetDetectTimer(well);


    Well_Detect_State[well] = false;
    Well_LED_State[well] = false;
    Pump_State[well] = false;
    TTL_IR_Detect_State[well] = false;

    Well_Active_TimeRef[well] = MAX_TIME_UL;
    Well_IR_TimeRef[well] = MAX_TIME_UL;
    PumpTimeRef[well] = MAX_TIME_UL;
    Well_IR_RefracTimeRef[well] = 0;
    TTL_IR_Detect_Timer = 0;

    Well_Active_Timer[well] = 0;
    PumpTimer[well] = 0;
    Well_IR_Timer[well] = 0;
  }

  // LEDs
