integration require.js + some changes