Migrate to require.js