Changed includes in calibration. Fixed bugs in extraction of data.