Working 'replace node' functionality.