Updates to threading code for UHCore
Remove debug code
Merge pull request #22 from uh-nmb/master

More threading changes