fixed quadratic estimator, other small changes