Work on clangthread
Split up some.
More work on clangthread