Make wrap a free function.
Merge remote-tracking branch 'upstream/master'