Cranked up TRIES from 50 to 500: alas more tests fail now.
Corrected a test
Replaced some type parameters in tests by int.