Refactor effects