first pass at refactoring admin functionality