Incomplete fix for memory leaks
Save references to node handlers