code cleanup; fix toggle_logging; make predicate clicking affect picked nodes not just chosen ones