Move shorten url logic so it's doing it in the proper location.