Add script from Paul Randal and clean up duplicates