Easy to follow description of the equihash algorithm

I’m hoping someone can help me with this. I’ve written the code twice, two different ways but still getting the same problem. i.e. Way too many duplicates! Is it normal that after every round the resulting hashes increase? I’ve tried various ways to cut down on duplicates but nothing seems to work. Either I end up with 2 million solutions at the end or no solutions or trillions of solutions.

Just to confirm in case I’m making a fundamental error… after sorting by the first 20 bits, say you have 4 colliding hashes: A, B, C, D. Out of those 4 I’m making 6 index tuples e.g.

A.B
A.C
A.D
B.C
B.D
C.D

That’s correct right?

I’ve tried knocking out collisions based on a histogram table ( > 13) but it doesn’t help much. I’ve also tried knocking out those that result in solution too early. Again doesn’t solve the problem. I ether get too many solutions or it runs out of hashes before it gets to step 9.