Refactored admin state to use node-style callbacks
Fixed errors after refactoring and generalized rest interface