Refactored handleCollapseExpandNode to conformt to BaseNode.autoId. Minor code cleanup.