Updates for kmedoid bugs and some changes to handle isReady better.