Fix and simplify implementation of 'colorRescale'.
Fix and simplify implementation of 'findMinMax'.
Code cosmetics.