Final edits to k-means classifier algorithm