Refactor auditlogger