Improve test failure output
Stop leaking memory
Merge pull request #1603 from ben/shallow

Shallow-clone detection