Updated examples
Changed thread spawning