Minor refactoring on Effect.cs to better memory usage