Tweaks to threading

Gone from doing it properly to getting it working. Will revise.