code: function loadpage(path, vars, user, newvalue) {
    // __dirname = path.resolve(); // If in the REPL
    if(typeof vars != "object") vars = {};
    var serverFileContent = readServerFile();
    var env = {
        googleClientId: googleClientId,
        vars: vars,
        user: toLeoQuery(user || {}),
        defaultOptions: toLeoQuery(defaultOptions),
        path: path,
        fileOperations: [] };
    
    if(typeof newvalue == "undefined") {
      return [evaluateToHtml(path, env, serverFileContent), vars];
    } else { // We update the page and re-render it.
      var newVal = sns.nativeToVal(newvalue);
      console.log("Started to update...");
      var result = sns.objEnv.string.update(env)(serverFileContent)(newVal);
      console.log("Update finished (first solution)");
      if(result.ctor == "Ok") {
        var allSolutions = result._0;
        // Instead of iterating through all the solutions, just detect if there is an ambiguity.
        var solution = getOneSolution(path, serverFileContent, allSolutions);
        if(solution === false) {
          return [{ctor: "Err", _0: "Empty list of solutions"}];
        } else {
          console.log("Checking for ambiguities");
          var allSolutionsTail = sns.lazyList.tail(allSolutions);
          var solution2 = getOneSolution(path, serverFileContent, allSolutionsTail);
          if(solution2 === false) { // No ambiguity, we can immediately process the change.
            console.log("No ambiguity");
            return solution;
          } else {
            console.log("Ambiguity found");
            var solutionKey = uniqueKey();
            var cachedSolution = {
                timestamp: (+ new Date()),
                computed: [solution, solution2],
                remaining: allSolutionsTail,
                path: path,
                serverFileContent: serverFileContent
            }
            cachedSolutions[solutionKey] = cachedSolution;
            return solution.concat(solutionKey);
          }
        }
      } else return [result];
    }
  }
docs: Returns a [Result of string containing the requested page, new overrides] If newvalue is defined, performs an update before returning the page.