changed root folder for r.js, and other changes to the API