Remove unused function
Only write changed nodes