     #Not used ... window.location.hash='game='+encodeURIComponent(game)
     root.currentGame = new GameManager env
     root.currentGame.startGame()
-    root.currentGame.helpTips() unless env.stats.runCount >0
-    return
-
-deepcopy = (src) -> $.extend(true, {}, src)
+    root.currentGame.helpTips() unless env.stats.runCount > 0
+    return
+
+# Some browsers have a deepcopy function, others do not.
+# For those who do not, we use the JQuery deepcopy function.
+if not deepcopy?
+    deepcopy = (src) -> $.extend(true, {}, src)
 
 # BACKEND Methods useful for all games
-root.getString = (key) -> localStorage.getItem key
-
-root.setString = (key, value) -> localStorage.setItem key, value
-
-root.clearString = (key) -> localStorage.removeItem key
+
+# How Storage Works:
+# The browser has a persistant localstorage dictionary.
+# We currently take data, turn it into a JSON object, and store it in this
+# local storage.
+
+root.getString = (key) ->
+    ###
+        Internal Function (used only by the code in this file)
+
+        Retrieves a string from the browser's internal storage dictionary.
+
+        @param key
+            The key for the string we are retrieving.
+    ###
+    return localStorage.getItem key
+
+root.setString = (key, value) ->
+    ###
+        Internal Function (used only by the code in this file)
+
+        Sets a string in the browser's internal storage dictionary.
+
+        @param key
+            The key for the string we are storing.
+            This should be a DOMString.
+        @param value
+            The value we want associated with the key in the browser's
+            internal storage.
+            This should be a DOMString.
+    ###
+    localStorage.setItem key, value
+
+root.clearString = (key) ->
+    ###
+        Internal Function (used only by the code in this file)
+
+        Clears a string in the browser's internal storage dictionary.
+
+        @param key
+            The key for the string we are clearing.
+            This should be a DOMString.
+    ###
+    localStorage.removeItem key
+    return
 
 root.load = (key) ->
+    ###
+        Internal Function (used only by the code in this file)
+
+        Retreives and parses data from the localstorage and returns it.
+
+        @param key
+            The key of the data to load.
+    ###
     val = root.getString key
     return null unless val?
     result = JSON.parse val

    return

root.waitForWrapper = (callback) ->
    root.wrapperCompiledCallback = callback
    return

root.reference = () ->

 # FRONTEND UI
root.drawGameMap = (player) ->
    descriptions = root.getGameDescriptions()
    mapDiv = $(root.UIcont)
    mapDiv.empty()

        # console.log "Game: #{game}"
        count = count + 1
        sel.buildDiv(count, game, descriptions[game], player.games[game], root.canPlay(game), codeland)
        return
    qcount = 0
    for quest in root.quests
        $("<div bgcolor='#888888'>Quest #{++qcount}:#{quest.title}</div>").appendTo tmp1
