Removed hardcoded thread handling