Admin panel, refactoring