Updating app to use require.js framework