Refactor view admin