Miscellaneous small cleanups