Refactored mono thread wrapper.