Melt + little optimization

I optimized RemoveDupArray a little bit. Was O(n^2log(n)) and now is nlog(n)...
Computing scales now take ~700ms versus 210000ms before... (432000 entries after melt)