Drop dependency on _.each and _.reduce