Refactored selinux module