More fiddling with the general formulation.  It is looking pretty good now.