Remove unnecessary thread from main()