lots of small cleanup changes.