Move tests to a top-level package

This may be a cleaner way to organize all tests.
Add test for threads