code: function(params) {
      if (!params || !params.query) return;
      if (params.query && params.query.timeframe) {
        var unpackedTime = TimeframeUtils.unpackTimeframeParam(params.query.timeframe, params.query.timezone);
        params.query.time = unpackedTime.time;
        params.query.timezone = unpackedTime.timezone;
      }
      if (params.query.group_by && !_.isArray(params.query.group_by)) {
        params.query.group_by = [params.query.group_by];
      }
      if (params.query.filters) {
        params.query.filters = _.compact(_.map(params.query.filters, FilterUtils.formatFilterParams));
      }
      if (params.query.steps) {
        params.query.steps = _.compact(_.map(params.query.steps, FunnelUtils.formatQueryParams));
        params.query.steps[params.query.steps.length - 1].active = true
      }
      if (!params.id && params.query_name) params.id = params.query_name;
  
      if (!params.metadata) {
        params.metadata = {};
      }
  
      if (!params.metadata.display_name) params.metadata.display_name = params.query_name;
      if (!params.metadata.visualization || !params.metadata.visualization.chart_type) {
        params.metadata.visualization = {};
        if (params.query.interval) {
          params.metadata.visualization.chart_type = "area";
        } else {
          params.metadata.visualization.chart_type = "metric";
        }
      }
      return params;
    }
docs: Takes in an object of query params directly taken from the URL and formats/deconstructs them appropriately to work well
  with our data model.
  @param  {Object} the raw params from the URL
  @return {Object} formatted attributes to be used for creating a new Explorer model.