Introduce resid variable for scalars to replace residField0, residField1, and so on.