Added test bodies and some implementation to Envelope.