Added more admin functionality and general refactoring