Role-based refactoring almost working.