Miscellaneous clean-ups

No functional changes in this PR, just a few clean-ups.