Restructure using latest require.js methods