Refactor image effects