Changed code so it no longer opens a file from the disk. The list is now stored in memory.
Passed the result list location to the search function to simplify the main loop.