Implemented Tarjan's algorithm for removing dead-end nodes.

 - Previous two pass algorithm didn't work in all cases.
 - Tarjan's is a single pass, and ~2x the speed.

Cleaning up Tarjans algorithm

Cleaning up Tarjan code

Tarjan cleanup

Cleanup Tarjan