Converted to using require.js