Refactor admin