This code (lines 180 to 187) could be simplified to something like:

```
if (!map[displayHtml]) {
    map[displayHtml] = [];
}
map[displayHtml].push(file);
```

Then at line 192 just check for `value.length > 1`.