Final cleanups responding to Brian's code review....
Final cleanups responding to Brian's code review.
The code isn't perfect yet, but good enough for integration into trunk
so Evan and the others can start using it. I've noted at the top a
few key todo items left to think about.