Added r.js to the build. Moved external libraries.