> a better solution (involving more work/refactoring) could be to use a JavaScript bundler like Browserify to bundle all the JS files into one.