Added getInstance to AppController.
Made AppController conform to the singleton pattern.