UrlShortener in Scala