Fixing up LineGraphs algorithms. Completely new.