Change to use require.js, and make it runnable in browsers.