Node.js client code cleanup