Add Tests. Remove cache.

The cache had problems that if there were multiple possible matches
for a particular node, returning that node on future searches
may not be the right thing to do. For now I just removed it.