use "initialized" instead of the component ID, which is type "byte" (unsigned char, always >= 0).
Set componentId to be type byte, not int, since that's what it is. Try to use explicit types.
Fix calibration tool so that it seems to work; calibration usage is still untested, but at least the utility functions, seemingly without side-effects!