Update clar and some test helpers clean up

This updates to the latest clar and also adds a new helper function to do more test cleanup.

I extracted these changes from #1431 so that PR could be cleaner.