Revert generate node function