Small bits of cleanup and fixes