Preparing JS files in order to work