introduced require.js and fixed transition bug