Pull in some cleanup changes by sm6xmm and Omwah