Reorganized calibration stuff