Revert "Further Algorithm Improvements"

This reverts commit d3ce4f3a48b32a6ba4ff0c24fdcf85ca3bc9f928.