Moved some admin functions to the admin class.