refactoring,  and rework of node source code