Convert the scriptDownloader file from Coffee to JS