Clean string metrics optimizer