Clean main().. Try leaving basic initializations in main, and the construction of the application in another function called pragha_aplication_new().