Improved Envelope.h.