Refactoring in delphi gui calibration