Factor out string representation of conn