before adding per-observation weights and sum meas

before adding per-observation weights and summary measures to variance
estimation and moving the variance estimation section to its own
functions