refined fitting in the main emass function to not fail when fitting
Updated auto fit range, should be better, and retries if the fit fails