Refactoring the permissions