Edited MovingAverageEnvelope class