Cleaner way of deriving shortUrl