Working on actual thread code. Very broken at this point.