Fix calibrate function and several others C++ and documenting relative changes, anyway intermediate commit