Updated coef maker with mass matrix maker