Moved server state functions to AppController