Miscellaneous cleanup throughout.