Refactored MutationMacro, extract add node logic