Fix problem where static caches interfere with test runs, and clean up a little