Improved code quality; managed to improve R(SF/OF) range to get stable fit with convergence