Refactor admin panel