Removed unnecessary backquotes and @LOGDB@ references.
Force all @entity_info values to be NULL whenever @entity_type is Contact.  Removed unnecessary BEGIN/END tokens.