Rewrote the minibatch fit() loop, and added a new c function to compute the intertia at the end