Added custom r.js implementation.