Some optimalizations.

Don't generate the helper methods on each request, just generate them
once and then add them.
Also, forgot to add next() in production.js.