Modify relevancy checks
Revert to original file
Added some more test cases