refName now accepts RefTarget instead of Maybe RefTarget