Optimize clone

replaces #1785

I rebased and added a few tests. Also run sauce tests.