Make Drilling.residuals a function of Drilling.variables. This will allow for a per site optimization.