Multi-threading improvements