Code attempting to generalized Hui-Walter estimation.