Refactor node.js scaffolding