Datathread backport and enhancements