Restructured the js files