Add missing email templates
Some fixes in jsonrewriter and notifications delivery