anchor.diff:      if (fielddata.password) {
         document.getElementById('pwd').value = fielddata.password;
       }
  -    if (fielddata.var_key) {
  -      document.getElementById('varKey').value = fielddata.var_key;
  -    }
  -    if (fielddata.var_val) {
  -      document.getElementById('varValue').value = fielddata.var_val;
  +    var variables = fielddata.variables;
  +    var variable_keys = Object.keys(fielddata.variables);
  +
  +    /* Create variables fields until all stored variables have an input field */
  +    while (document.getElementById('variables_list').children.length < (variable_keys.length * 2)) {
  +      addVariables();
  +    }
  +    for (var i=0; i < variable_keys.length; i++) {
  +      document.getElementById('varKey' + i).value = variable_keys[i];
  +      document.getElementById('varValue' + i).value = variables[variable_keys[i]]; 
       }
       if (fielddata.timeout) {
         document.getElementById('timeoutInterval').value = fielddata.timeout;
  
positive.code:     var payload = assembleFullPayload();
  
      /* Replace variable keys with their specified values */
      if (payload.var_key && payload.var_val){
        payload.url     = payload.url.replace('{{' + payload.var_key + '}}', payload.var_val);
        payload.payload = payload.payload.replace('{{' + payload.var_key + '}}', payload.var_key);
  
        /* Replace values in header */
        var keys = Object.keys(payload.headers);
        for(var n=0; n<keys.length; n++) {
          payload.headers[keys[n]] = payload.headers[keys[n]].replace('{{' + payload.var_key + '}}', payload.var_val);
        }
  
        /* Replace keys in header */
        for(var m=0; m<keys.length; m++) {
          if (keys[m].indexOf('{{' + payload.var_key + '}}') != -1){
            payload.headers[keys[m].replace('{{' + payload.var_key + '}}', payload.var_val)] = payload.headers[keys[m]];
            delete payload.headers[keys[m]];
          }
        }
  
negative.code:   }
  
    function clearVariables() {
      // Clear variables from Settings -> Variables
      document.getElementById('varKey0').value   = '';
      document.getElementById('varValue0').value = '';
  
      var container = document.getElementById('variables_list');
      var children = container.children;
  
      while (container.children.length > 2){
        container.removeChild(container.lastChild);
      }
    }
  
    /*clear all form fields. Delete additional header fields*/
  