Made the application loop