Most of admin refactoring (#136)