Merging in email alerts branch to master