Refactored Security Filtering