NSThread, other improvements. Almost compilable