NodeUtils refactor from master.