COMP: Do not redefine variable

Use existing nodes variable instead of defining another one, also
check for invalid pointers in destructor. Formatting
changes as well
Merge branch 'bug-18370-remove-abouttoshow'