isAncestor? properly handles cycles now
test cases: Added isAncestor? large file test cases.