Made best fit and minimization routine for N planets!