Further cleanups from merging from master