Updated cluster quality code.