Added more effects and correct the contrast algorithm