Refine playlist script.