use js-beautify from the node_modules dir
use _.reduce instead of _.forEach