Renamed audit events to audit entries to prevent future name conflicts
and refactored some audit code