Revert "Rewrote generate_pairs to ldat"

This reverts commit 8a3eca7872875912035831d14af40369576fc26b.