Updated for simplifed node.js api