Reorganized core JS files