Update heterogeneity calculation. Testing still required