Added heterogeneity calculation and viewer