Fixed setup for recommendations API

Also switched arguments loop to use lodash.forEach since it is faster
and safer
In V8, lodash's forEach is slightly faster than native forEach.

http://jsperf.com/fast-array-foreach/77