         .tap (res) -> W.map(res, compile_single_views.bind(@))
 
     ###*
-     * Promises to retrieve data, then
-     * stores object in locals hash
-     * @param {String} key - the record key
-     * @param {Object} obj - the key's parameters
+     * Fetches the JSON data from a url, file, or data and returns it neatly as
+     * an object containing the key, options, and resolved data.
+     *
+     * @param {String} key - name of the record being fetched
+     * @param {Object} opts - options provided under the key
+     * @returns {Promise|Object} - a promise for an object with a `key`,
+     * `options`, and `data` values
     ###
 
-    exec = (key, obj) ->
-      get(obj).then (res) =>
-        respond.call(@, key, obj, res)
-      .tap (res) =>
-        if obj.template
-          compile_single_views.call(@,
-            (if obj.collection? then obj.collection(res) else res),
-            obj.template,
-            obj.out
-          )
-
-    ###*
-     * Determines and calls the appropriate function
-     * for retrieving json based on keys in object.
-     * @param {Object} obj - the key's parameters
-    ###
-
-    get = (key, opts) ->
+    fetch = (key, opts) ->
       data_promise = switch
         when opts.hasOwnProperty('url') then resolve_url(opts)
         when opts.hasOwnProperty('file') then resolve_file(opts)
         when opts.hasOwnProperty('data') then W.resolve(opts.data)
-        else throw new Error("Key must be 'url', 'file', or 'data'")
+        else throw new Error("You must provide a 'url', 'file', or 'data' key")
 
       data_promise.then (data) -> { key: key, options: opts, data: data }
 
     ###*
-     * Runs http request for json if URL is passed,
-     * adds result to records, and returns a resolution.
-     * @param {Object} obj - the key's parameters
-     * @param {Function} resolve - function to resolve deferred promise
+     * Makes a request to the provided url, returning the response body as JSON.
+     *
+     * @param {Object} opts - the key's parameters
      ###
 
     resolve_url = (opts) ->

     ###

    setup: ->
      fetch_records = (get(key, conf) for key, conf of opts)

      W.all(fetch_records).with(@)
        .then (res) -> W.map(res, apply_hook)

rest      = require 'rest'
path      = require 'path'
W         = require 'when'
node      = require 'when/node'
_         = require 'lodash'
RootsUtil = require 'roots-util'

