Refactored perms provider module