admin panel
Some refactoring