Some good refactorings for the admin pages