Add compound required and custom email template and fix delete compound ...

...bug