I don't think ref_name should be optional or that it should be possible for it to be None