Initial work on emthread.