Updated to require.js pattern.