Clean up tests so they can all run sequentially correctly. Fixes #116.