fixed and simplified copying of script elements: now works with multiple script elements.
Changed paths: