Added Fit._function for performance.