refactor admin pages