comment and imports cleanup, removed WeightedNode
use dfs in sortDFS, fixes #264