Added find_state_center / removed bug from find_centroid