_MODE == 'test') {
      return origGetUtterance();
    } else {
      return {
        'utterance': origGetUtterance(),
        'fields': core.currentFields,
      };
    }
  };
})(core.getUtterance);


// empty the UI at the start of the episode and set it up
// with the main and search templates.
var setupInbox = function(){
  $('#area').empty();
  var main = document.createElement('div');
  main.setAttribute('id', 'main');
  main.setAttribute('class', 'hide');
  main.innerHTML = MAIN_TEMPLATE;
  $('#are