code: function dropThemes(file, stack){
    if (!stack)
      stack = [];
    if (stack.indexOf(file) == -1)
    {
      stack.push(file);
  
      for (var i = 0, refFile; refFile = file.linkTo[i]; i++)
        dropThemes(refFile, stack);
  
      file.themes = null;
  
      stack.pop();
    }
  }
docs: Main part: file process