Minor refactoring in Node.lua