Simplify
Fix var name in template.
Improve res.negotiate.