Finished first-order singles elimination algorithm.