Refactor Effect and Filter templates instead of macros