Assorted test fixes and merge conflicts