Changed the AppRoot to allow for more functionality before and after the loading of the page's controller.