Add parallel map helper; finish k-means.