Various test tweaks, code review fixes