Oops. Move the shared function `fit` back to Core