 MEMEGEN_API_URL = "http://memegen.link"
 
 module.exports = (robot) ->
+    _templateCache = null
+
     robot.respond /meme list/i, (res) ->
+        return res.send(_templateCache) if _templateCache?
         GetMGResult res, "/templates/", null, (obj) ->
+            _templateCache = ""
             for template, url of obj
-                res.send "#{template} (#{url})"
+                key = url.split "/"
+                key = key[key.length - 1]
+                _templateCache += "#{template} | Key: #{key} | Example: http://memegen.link/#{key}/hello/world.jpg\n"
+            # TODO: Paste results?
+            res.send _templateCache
 
     robot.respond /meme (.+) --top (.+) --bottom (.+)/i, (res) ->
         template = res.match[1]

        bottomText = _spaceToHyphen(res.match[3])

        GetMGResult res, "/#{template}/#{topText}/#{bottomText}", null, (obj) ->
            res.send "Visible: #{obj.direct.visible}"
            res.send "Masked: #{obj.direct.masked}"

_spaceToHyphen = (str) ->
    str.replace(/\s+/g, '-').toLowerCase()

    res.http("#{MEMEGEN_API_URL}#{api}")
        .query(params)
        .get() (err, httpRes, body) ->
            # TODO: Improve error handling
            if err or (httpRes.statusCode isnt 200 and httpRes.statusCode isnt 302)
                res.reply "I'm unable to process your request at this time due to a server error. Please try again later."
                return res.robot.logger.error "hubot-memegen: #{body} (#{err})"

            handler JSON.parse(body)