         (initialize-exhibit3 (aget js/window "MODULES")
                              (aget js/window "AUXMODULES")))))
 
-(defn- get-short-url
-  "Tries to obtain a short url and sets the result in the #url-shortener
-   <input>"
-  [$urlShortenerInput localStorage]
+(defn- make-request-to-get-short-url
+  "Makes the ajax request to the server to obtain a short url"
+  [currentUrl $urlShortenerInput localStorage localStorageKey]
   (ajax "/shorten"
-        {:data     {:url (js/encodeURI
-                           (aget js/document "URL"))}
+        {:data     {:url (js/encodeURI currentUrl)}
          :dataType "json"
 
          :success

                     (.val $urlShortenerInput
                           "an error occurred"))}))

(defn- short-url-setup
  "Setup url shortening"
  []

        zcbClient          (ZeroClipboard. $copy-to-clipboard)
        $urlShortenerInput ($ :#url-shortener)]
    (.click $urlShortenerInput
            (get-short-url-jq-evt-handler-maker $urlShortenerInput
                                                localStorage))))

; Main entry point of the program
(defn ^:export init [acad-year sem]
