Merge thread.cpp files with the rest