Creates JS files from categories and now correctly makes the main JS file