Initial migration to require.js