restructured core code to move all DFS and BFS methods into galg, and clean up cncomnew, deg, and wdeg accordingly