More thread stuff
Merge pull request #6 from jules2689/better-threading-2

More thread stuff