Fix broken tests, small refactor per @stevendanna