Added some histogram equalization stuff.