Removed lots of int sorting functions.
more simplification
discrim without sorting