Changed choosing profiles and thread spawning.