Extracted the code two match two lists into a separate method

Cleans up the thing a bit
Testing the matching on a real program

And it works!