Cleanup thread setup a bit