Added calibration and other fixes