Assorted fixes per code review