Update and rename main.R to fit.R