revamped client side scripts so that they are loaded using Require.js instead.