Speed! 

I greatly improved the algorithmic complexity of a couple graph
algorithms, speeding up the assemble functions by ~3 times.