Delete unused nodes (need to verify)