Added code to cluster steps into group and only retain the best ones.