cleanup

This is the first round of cleanup. It will be incomplete -- I will do more.