Extract "applyNodeDefaults" to utils object