Add main loop of the App.