Clean up of the code and adding of the linear model for the computation of weight