I still feel like the gnarliness of the logic in here warrants more tests, but am happy to punt on that for now so that we can just get this sucker in.