First implementation of the refitting.