So results gets created, then deduped, then returned to search and set back to the global results...
It looks like the main reason for it to be global is so that findBy* can have access to it.
You can probably just pass it in as a parameter with a addResultsMatchingName(terms[i], results) or addResultsMatchingRoom(terms[i], results)