ConfigPutInDictionary <- function(dictionary, key, value) {
  # This function adds a key, value pair into a dictionary and checks there is  
  # no duplication
  if (key %in% names(dictionary)) {
    dictionary[[key]] <- value
    dictionary
  } else {
    dictionary[[length(dictionary) + 1]] <- value
    if (is.null(names(dictionary))) {
      names(dictionary) <- c(key)
    } else {
      names(dictionary)[[length(names(dictionary))]] <- key
    }
    dictionary
  }
}
