Fixed some effect code, but effect variables has a weird bug remaining.