       write_state(calibrated_input);
     }
   }
-  
-  process_input(input, calibrated_input, smoothed_input, lcd);
+
+  // Output.
+  int calibrated_gas = calibrated_input(raw_gas);
+  render_input(calibrated_gas, lcd);
 }

{
  unsigned long t = millis();
  int calibrate_button = digitalRead(CALIBRATE_BUTTON);
  int input = read_3v3(GAS_INPUT);
  
  if (calibrate_button == HIGH && calibration.state() == Calibration::Idle)
  {
    calibration.start(t, CALIBRATION_DURATION, input);
  }
  
  if (calibration.state() == Calibration::Running)
  {
    calibration.update(t, input, calibrated_input);
    render_calibration(t, lcd, calibration);

    if (calibration.state() == Calibration::Idle) // calibration is done

  print2(lcd, calibration.time_remaining(t));
}

void render_input (int input, LiquidCrystal& lcd)
{
  lcd.setCursor(6,0);
  print3(lcd, input);
}

LiquidCrystal lcd(7, 6, 8, 9, 10, 11);
