Minor changes to res.js