gh-8: Adds custom envelope demo. Improves envelope validation.