Remove reference to undefined variable.
Better handling of node bug.
Add names to all closures to aid debugging memory leaks.