Most of the equations for integral formulation in place (HF still missing).