Changed how threading works.
Fixed error spotted by @dwhly.
Rebased to newest version of develop branch, fixed bug where collapsing behaviour was different for search results.
Merge pull request #952 from RawKStar77/threads2

Changed how threading works.