Refactor RoleManager