Moved app initialization to the controller class