Factor out transposeTimesSelf and promote HPPC to common