At the moment, wrap, wrapInner and wrapAll all clones the input element, which results in that you can't manipulate your reference to the container after calling wrap, and have to resort to foo.parent() instead.
I think that for wrapAll in particular, no clone should be made, and the wrapping should be performed on the original element, as it will only be one "wrap" (singular) in the end.