FIX: use require.js where applicable