Changed to new method of finding centroid. Refactored code for centroid estimation