Refactoring admin pages