Optimize node removal