db event checking and namespace conflict fix

removed local references to "email" which may have conflicted with
module "email"
Added checks for pre-existing events in the DB