Reverted back to old color features and made performance improvements

I reverted back to using the old color features since the new ones
didn't work. I also added some caching of objective function values for
different distance functions so that it is faster to compute the values
for different subsets of distance functions.