General cleanup

Miscellaneous minor code clean-up.