various clean up; tests pass