Fixed setup for recommendations API

Also switched arguments loop to use lodash.forEach since it is faster
and safer
Although, this is irrelevant anyway because I'm changing this to a native for loop in the next commit.