Lots of test tweaks and relay fixes