We never moved this function outside of this listener. We could change the listener to `.on("click.searchResults .table-container tr", function (e) {` so that `$row = $(this)` and we can get rid of the first if. I am also thinking if we should split it into 2 listeners one for files and one for folders, although there is a bit of code used for both. But maybe the selected row should only apply to files?