Added Centroid computation.