Transfered script to JS files