Implement /envelope (not tested)
Merge branch 'master' into envelope
Add basic test for envelope
Fix comments