Working calibration
Some small fixes