More cleanup and speed up some tests