fixed recursion depth for transitive closure of path relation, cleaning
up