Greatly improve OFThread.
This fixes a lot of issues that happened in the real world.