(#1875) - use a library for extend

and then use clone for the 95% o the time where that is what we are using extend for.