Remove some debugging leftovers
Fix index calculation for dimension values in decreasing order