Clean up leaks in unit tests