Refactoring + added grid calibration and calibration computing