Refactored audit module