lot's of clean up. two or three fixes. now 10 tests fail, though