Refactor urlShortener.