separated the js files from main