Finishing up implementation of median cut.