Clean up activateNode function a bit; added documentation and comments, and tried to remove all redundant operations.
Clean up activateNode function a bit; added documentation and comments,
and tried to remove all redundant operations.

htem/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID