Changed envelopes map/object to envelopes array.