Add file to test Purity() and Deepcopy().

Various touch-ups to tests.